Skip to content

Commit

Permalink
fix: add unauthorized message
Browse files Browse the repository at this point in the history
  • Loading branch information
leeqvip committed Mar 22, 2024
1 parent 9aabaa5 commit 2daf43e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/exception/Unauthorized.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

namespace tauthz\exception;

class Unauthorized extends \Exception
use think\exception\HttpException;

class Unauthorized extends HttpException
{
/**
* Create a new exception instance.
*
* @return void
*/
public function __construct()
{
parent::__construct(403, '此操作未经授权');
}
}

0 comments on commit 2daf43e

Please sign in to comment.