2021-02-26 16:16:17 +00:00
|
|
|
<?php
|
2022-07-12 19:26:21 +00:00
|
|
|
|
2021-02-26 16:16:17 +00:00
|
|
|
namespace Safe\Exceptions;
|
|
|
|
|
2022-07-12 19:26:21 +00:00
|
|
|
/**
|
|
|
|
* @deprecated This exception is deprecated
|
|
|
|
*/
|
2021-02-26 16:16:17 +00:00
|
|
|
class PasswordException 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);
|
|
|
|
}
|
|
|
|
}
|