nibcq.errors.TemperatureError ============================= .. py:exception:: nibcq.errors.TemperatureError(message: str = 'Error occurred while trying to use the thermocouple.') Bases: :py:obj:`BCQError` Exception raised when some check or parameter related to the temperature is incorrect. These indicate that a thermocouple is either set incorrectly, or there was an error with the measured temperature depending on the set limits, or with the limit setting. This error is specific for the NIBCQ Python API. Some temperature-related checks are only throwing error through a logger, please be mindful of this when implementing error handling. Warnings are logged to stderr by default. :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: Thermocouple error** >>> raise TemperatureError("Error occurred while trying to use the thermocouple.") - **Specific: Settings not configured** >>> raise TemperatureError( >>> "Thermocouple settings are not configured. Use 'setup_thermocouple' first!" >>> ) - **Specific: Measured temperature and limit difference** >>> raise TemperatureError( >>> f"Current temperature {temp} exceeds target" >>> f"temperature {target_temp} ± {actual_delta}." >>> ) - **Specific: The device does not support Temperature measurements** >>> raise TemperatureError("Device has no temperature capability configured.")