blob: 3e6a4405460102dc6c4403ce8d257d59b2e7addb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Execution;
use RuntimeException;
use Throwable;
class TrapException extends RuntimeException
{
private readonly TrapKind $trapKind;
public function __construct(
string $message = "",
int $code = 0,
?Throwable $previous = null,
TrapKind $trapKind = TrapKind::Unknown,
) {
parent::__construct($message, $code, $previous);
$this->trapKind = $trapKind;
}
public function getTrapKind(): TrapKind
{
return $this->trapKind;
}
}
|