mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
11 lines
308 B
PHP
11 lines
308 B
PHP
<?php
|
|
namespace Safe\Exceptions;
|
|
|
|
class StatsException 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);
|
|
}
|
|
}
|