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.
|
<?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);
|
|
}
|
|
}
|