Exception API¶
-
exception
DaemonikerException¶ All of the custom exceptions in
Daemonikersubclass this exception. As such, an application can catch anyDaemonikerexception via:try: code_goes_here() except DaemonikerException: handle_error_here()
-
exception
SignalError¶ These errors are only raised if something goes wrong internally while handling signals.
-
exception
ReceivedSignal¶ Subclasses of
ReceivedSignalexceptions are raised by the default signal handlers. AReceivedSignalwill only be raise directly:- if the actual signal number passed to the callback does not match its expected value.
- if, on Windows, the signal handling daughter process terminates abnormally.
Note
Calling
int()on aReceivedSignalclass or instance, or a class or instance of any of its subclasses, will return the signal number associated with the signal.
-
exception
SIGINT¶ Raised for incoming
SIGINTsignals. May also be used tosend()signals to other processes.Attr SIGNUM: The signal number associated with the signal.
-
exception
SIGTERM¶ Raised for incoming
SIGTERMsignals. May also be used tosend()signals to other processes.Attr SIGNUM: The signal number associated with the signal.
-
exception
SIGABRT¶ Raised for incoming
SIGABRTsignals. May also be used tosend()signals to other processes.Attr SIGNUM: The signal number associated with the signal.
Exception hierarchy¶
The Daemoniker exceptions have the following inheritance:
DaemonikerException
SignalError
ReceivedSignal
SIGINT
SIGTERM
SIGABRT