fixed:修复类型异常未捕获
This commit is contained in:
parent
b1f5c22c9d
commit
a859e98207
@ -56,6 +56,11 @@ class CatchExceptionHandle extends Handle
|
||||
$e = new FailedException($e->getMessage(), 10005, $e);
|
||||
}
|
||||
|
||||
// 类型错误
|
||||
if ($e instanceof \TypeError) {
|
||||
$e = new FailedException($e->getMessage(), 10005, $e);
|
||||
}
|
||||
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
|
||||
|
10
extend/catcher/middlewares/JsonResponseMiddleware.php
Normal file
10
extend/catcher/middlewares/JsonResponseMiddleware.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin [Just Like ~ ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
Loading…
x
Reference in New Issue
Block a user