| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | class TExitException extends TSystemException |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * @var int The exit code |
||
| 29 | */ |
||
| 30 | protected int $_exitCode; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constructor. |
||
| 34 | * @param int $exitCode The status exit code. |
||
| 35 | * @param ?string $message The error message. |
||
| 36 | * @param array $args All the additional parameters. |
||
| 37 | */ |
||
| 38 | public function __construct(int $exitCode = 0, ?string $message = null, ...$args) |
||
| 39 | { |
||
| 40 | $this->_exitCode = $exitCode; |
||
| 41 | parent::__construct($message, ...$args); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return int The exit code to end the application process. |
||
| 46 | */ |
||
| 47 | public function getExitCode(): int |
||
| 50 | } |
||
| 51 | } |
||
| 52 |