nibcq.errors.CurrentAmplitudeError

exception nibcq.errors.CurrentAmplitudeError(message: str = 'The specified current amplitude is invalid or exceeds limits.')

Bases: BCQError

Exception raised when the current amplitude is invalid or exceeds limits.

This error occurs when the specified current amplitude is outside the acceptable range.

Parameters:

message (str, optional) – Custom error message. Defaults to a standard message.

Examples

The following are examples of how this error can be raised:

  • General amplitude issue

    >>> raise CurrentAmplitudeError(
    >>>     "The specified current amplitude is invalid or exceeds limits."
    >>> )
    
  • Amplitude exceeds maximum limit

    >>> raise CurrentAmplitudeError(
    >>>     f"The specified current amplitude {current_amplitude} A exceeds
    >>>     the maximum allowed limit of {max_current_amplitude} A."
    >>> )