JsonException.php 248 B

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