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

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']);
}
}