Coverage for src/duty/exceptions.py: 100.00%
4 statements
« prev ^ index » next coverage.py v7.6.3, created at 2024-10-17 17:18 +0200
« prev ^ index » next coverage.py v7.6.3, created at 2024-10-17 17:18 +0200
1"""Module containing the project's exceptions."""
4class DutyFailure(Exception): # noqa: N818
5 """An exception raised when a duty fails."""
7 def __init__(self, code: int) -> None:
8 """Initialize the object.
10 Parameters:
11 code: The exit code of a command.
12 """
13 super().__init__(self)
14 self.code = code