12345678910111213141516171819202122232425262728293031 |
- <?php
- // +----------------------------------------------------------------------
- // | [ 认证异常抛出 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2018-2020 rights reserved.
- // +----------------------------------------------------------------------
- // | Author: TABLE ME
- // +----------------------------------------------------------------------
- // | Date: 2020-08-25 16:18
- // +----------------------------------------------------------------------
- namespace library\exceptions;
- use Throwable;
- /**
- * Class AuthException
- * @package \exceptions
- */
- class AuthException extends \RuntimeException
- {
- public function __construct($message = "", $code = -1, Throwable $previous = null)
- {
- if (is_array($message)) {
- $errInfo = $message;
- $message = $errInfo[1] ?? '未知错误';
- $code = $errInfo[0] ?? -1;
- }
- parent::__construct($message, $code, $previous);
- }
- }
|