14 lines
309 B
PHP
14 lines
309 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Exceptions;
|
||
|
|
|
||
|
|
class AuthServiceException extends \RuntimeException
|
||
|
|
{
|
||
|
|
public static function of(?string $message = null, ?\Throwable $cause = null): self
|
||
|
|
{
|
||
|
|
return new self($message ?? 'An authentication error occurred.', previous: $cause);
|
||
|
|
}
|
||
|
|
}
|