Files

12 lines
308 B
PHP
Raw Permalink Normal View History

2026-03-30 14:54:57 +07:00
<?php
namespace Safe\Exceptions;
class UopzException extends \ErrorException implements SafeExceptionInterface
{
public static function createFromPhpError(): self
{
$error = error_get_last();
return new self($error['message'] ?? 'An error occurred', 0, $error['type'] ?? 1);
}
}