nibcq.errors.CurrentAmplitudeError ================================== .. py:exception:: nibcq.errors.CurrentAmplitudeError(message: str = 'The specified current amplitude is invalid or exceeds limits.') Bases: :py:obj:`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. :param message: Custom error message. Defaults to a standard message. :type message: str, optional .. rubric:: 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." >>> )