改名
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Exception;
|
||||
|
||||
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -14,7 +15,13 @@ use Throwable;
|
||||
class AuthException extends \Exception
|
||||
{
|
||||
|
||||
public function __construct($message = "", $code = 0, Throwable $previous = null)
|
||||
/**
|
||||
* AuthException constructor.
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
#[Pure] public function __construct($message = "", $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, 401, $previous);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Exception;
|
||||
|
||||
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -19,7 +20,14 @@ use Throwable;
|
||||
class ComponentException extends \Exception
|
||||
{
|
||||
|
||||
public function __construct(string $message = "", int $code = 0, Throwable $previous = NULL)
|
||||
|
||||
/**
|
||||
* ComponentException constructor.
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
#[Pure] public function __construct(string $message = "", int $code = 0, Throwable $previous = NULL)
|
||||
{
|
||||
parent::__construct($message, 5000, $previous);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,10 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Class ConfigException
|
||||
* @package Snowflake\Exception
|
||||
*/
|
||||
class ConfigException extends \Exception
|
||||
{
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Snowflake\Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Class InitException
|
||||
* @package Snowflake\Exception
|
||||
*/
|
||||
class InitException extends \Exception
|
||||
{
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Exception;
|
||||
|
||||
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -19,7 +20,13 @@ use Throwable;
|
||||
class NotFindClassException extends \Exception
|
||||
{
|
||||
|
||||
public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
|
||||
/**
|
||||
* NotFindClassException constructor.
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
#[Pure] public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$message = "No class named `$message` was found, please check if the class name is correct";
|
||||
parent::__construct($message, 404, $previous);
|
||||
|
||||
@@ -5,6 +5,10 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Class RedisConnectException
|
||||
* @package Snowflake\Exception
|
||||
*/
|
||||
class RedisConnectException extends \Exception
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user