1 2 3 4 5 6 7 8 9 10 11 12
<?php namespace Safe\Exceptions; class JsonException extends \JsonException implements SafeExceptionInterface { public static function createFromPhpError(): self { return new self(\json_last_error_msg(), \json_last_error()); } }