mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 01:22:23 -04:00
14 lines
302 B
PHP
14 lines
302 B
PHP
<?php
|
|
|
|
|
|
namespace Safe\Exceptions;
|
|
|
|
abstract class AbstractSafeException extends \ErrorException implements SafeExceptionInterface
|
|
{
|
|
public static function createFromPhpError(): self
|
|
{
|
|
$error = error_get_last();
|
|
|
|
return new static($error['message'], 0, $error['type']);
|
|
}
|
|
}
|