mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 01:22:23 -04:00
Add Safe PHP functions
This commit is contained in:
parent
04a956886a
commit
58cc098058
260 changed files with 49458 additions and 45 deletions
12
vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
vendored
Normal file
12
vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?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());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue