Source code for run_iocsh.exceptions

"""Exception classes for run-iocsh."""


[docs] class RunIocshError(Exception): """Base class for exceptions in this module."""
[docs] class IocshStateError(RunIocshError): """Exception raised for programming errors (wrong state transitions)."""
[docs] class IocshAlreadyRunningError(IocshStateError): """Exception raised when IOC is started a second time."""
[docs] class IocshTimeoutError(RunIocshError): """Exception raised when a timeout occurred trying to send exit to the IOC."""
[docs] class IocshStartupError(RunIocshError): """Exception raised when IOC exits before the expected readiness pattern appears."""
[docs] class IocshOutputError(RunIocshError): """Base exception for errors detected in IOC output."""
[docs] class IocshFileNotFoundError(IocshOutputError, FileNotFoundError): """Exception raised when a file referenced in the startup script is not found."""
[docs] class IocshModuleNotFoundError(IocshOutputError): """Exception raised when the required module is not found."""
[docs] class IocshMissingSharedLibraryError(IocshOutputError): """Exception raised when shared library is missing."""
[docs] class IocshProcessError(IocshOutputError): """Exception raised when the iocsh script exits with a non null return code."""
[docs] class IocshPatternMatchError(IocshOutputError): """Exception raised when a fail_on pattern matches the IOC output."""