web/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
2019-03-07 12:11:50 -06:00

12 lines
250 B
PHP

<?php
namespace Safe\Exceptions;
class JsonException extends \Exception implements SafeExceptionInterface
{
public static function createFromPhpError(): self
{
return new static(\json_last_error_msg(), \json_last_error());
}
}