Source code for cement.core.exc

"""Cement core exceptions module."""

[docs] class FrameworkError(Exception): """ General framework (non-application) related errors. Args: msg (str): The error message """ def __init__(self, msg): Exception.__init__(self) self.msg = msg def __str__(self): return self.msg
[docs] class InterfaceError(FrameworkError): """Interface related errors.""" pass
[docs] class CaughtSignal(FrameworkError): """ Raised when a defined signal is caught. For more information regarding signals, reference the `signal <>`_ library. Args: signum (int): The signal number frame: The signal frame object """ def __init__(self, signum, frame): msg = 'Caught signal %s' % signum super(CaughtSignal, self).__init__(msg) self.signum = signum self.frame = frame