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
311 B
PHP
12 lines
311 B
PHP
<?php
|
|
namespace Safe\Exceptions;
|
|
|
|
class LibeventException 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);
|
|
}
|
|
}
|