diff options
Diffstat (limited to 'vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php')
-rw-r--r-- | vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php new file mode 100644 index 000000000..f344490d8 --- /dev/null +++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php @@ -0,0 +1,11 @@ +<?php +namespace Safe\Exceptions; + +class ApcException extends \ErrorException implements SafeExceptionInterface +{ + public static function createFromPhpError(): self + { + $error = error_get_last(); + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); + } +} |