Skip to main content

Exceptions

Instro-specific errors inherit from InstroError.
from instro.lib.exceptions import InstroError

try:
    ...
except InstroError:
    ...

FeatureNotSupportedError

FeatureNotSupportedError is raised when a driver cannot provide a requested feature.
from instro.lib.exceptions import FeatureNotSupportedError

try:
    psu.set_remote_sense_enabled(True, channel=1)
except FeatureNotSupportedError:
    ...
Use FeatureNotSupportedError when the connected instrument or driver interface does not expose the feature. Use NotImplementedError when the feature exists but the driver has not implemented it yet.