blob: 3644d33251819d6c04f3f2f4998e8458dc96630d (
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\WebAssembly\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;
}
}
|