An exception that indicates that the application should exit with some status code. :param code: the status code to exit with.
| 364 | |
| 365 | |
| 366 | class Exit(RuntimeError): |
| 367 | """An exception that indicates that the application should exit with some |
| 368 | status code. |
| 369 | |
| 370 | :param code: the status code to exit with. |
| 371 | """ |
| 372 | |
| 373 | __slots__ = ("exit_code",) |
| 374 | |
| 375 | exit_code: t.Final[int] |
| 376 | |
| 377 | def __init__(self, code: int = 0) -> None: |
| 378 | self.exit_code = code |