Skip to content

exceptions ¤

Module containing the project's exceptions.

Classes:

  • DutyFailure

    An exception raised when a duty fails.

DutyFailure ¤

DutyFailure(code: int)

Bases: Exception

An exception raised when a duty fails.

Parameters:

  • code (int) –

    The exit code of a command.

Source code in src/duty/exceptions.py
 7
 8
 9
10
11
12
13
14
def __init__(self, code: int) -> None:
    """Initialize the object.

    Parameters:
        code: The exit code of a command.
    """
    super().__init__(self)
    self.code = code