1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Core;
4:
5: use Stringable;
6: use Throwable;
7:
8: /**
9: * @api
10: */
11: interface ExceptionInterface extends Throwable
12: {
13: /**
14: * Get an instance with an exit status to return if the exception is not
15: * caught on the command line
16: *
17: * @return static
18: */
19: public static function withExitStatus(?int $exitStatus): ExceptionInterface;
20:
21: /**
22: * Get the exit status to return if the exception is not caught on the
23: * command line
24: */
25: public function getExitStatus(): ?int;
26:
27: /**
28: * Get exception metadata as an associative array
29: *
30: * @return array<string,int|float|string|bool|Stringable|null>
31: */
32: public function getMetadata(): array;
33: }
34: