You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
306 B
PHTML
12 lines
306 B
PHTML
4 years ago
|
<?php
|
||
|
namespace Safe\Exceptions;
|
||
|
|
||
|
class UrlException 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);
|
||
|
}
|
||
|
}
|