[docs]
class PSPError(Exception):
"""Generic error message (Base class for all exceptions in Lanner PSP)"""
[docs]
class PSPNotExist(PSPError, FileNotFoundError):
"""Error raised when library file is not found/plugged, or the device does not exist"""
[docs]
class PSPNotOpened(PSPError, RuntimeError):
"""Error raised when library is not opened or not ready yet"""
[docs]
class PSPInvalid(PSPError, ValueError):
"""Error raised when the Parameter is not a valid value or out of range"""
[docs]
class PSPNotSupport(PSPError, RuntimeError):
"""Error raised when this function is not supported in this platform"""
[docs]
class PSPBusyInUses(PSPError, RuntimeError):
"""Error raised when library is being used now or device IO is busy now"""
[docs]
class PSPBoardNotMatch(PSPError, RuntimeError):
"""Error raised when the board library and the board do not match"""
[docs]
class PSPDriverNotLoad(PSPError, RuntimeError):
"""Error raised when the lmbiodrv driver or i2c-dev driver not loading"""
[docs]
class IPMIError(PSPError):
"""Base class for errors related to the IPMI implementation"""
[docs]
class IPMIIdleState(IPMIError, RuntimeError):
"""Error raised when IPMI KCS interface is not in IDLE State"""
[docs]
class IPMIWriteState(IPMIError, RuntimeError):
"""Error raised when IPMI KCS interface WRITE State check failure"""
[docs]
class IPMIReadState(IPMIError, RuntimeError):
"""Error raised when IPMI KCS interface READ State check failure"""
[docs]
class IPMIIBF0(IPMIError, RuntimeError):
"""Error raised when IPMI KCS interface wait IBF ‘0’ State failure"""
[docs]
class IPMIOBF1(IPMIError, RuntimeError):
"""Error raised when IPMI KCS interface wait OBF ‘1’ State failure"""
[docs]
class PSPWarning(Warning):
"""Base class for all warnings in Lanner PSP"""