Skip to content

Commit 2daf43e

Browse files
committed
fix: add unauthorized message
1 parent 9aabaa5 commit 2daf43e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/exception/Unauthorized.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
namespace tauthz\exception;
44

5-
class Unauthorized extends \Exception
5+
use think\exception\HttpException;
6+
7+
class Unauthorized extends HttpException
68
{
9+
/**
10+
* Create a new exception instance.
11+
*
12+
* @return void
13+
*/
14+
public function __construct()
15+
{
16+
parent::__construct(403, '此操作未经授权');
17+
}
718
}

0 commit comments

Comments
 (0)