fixed:修复类型异常未捕获

This commit is contained in:
JaguarJack 2020-08-27 16:18:09 +08:00
parent b1f5c22c9d
commit a859e98207
2 changed files with 15 additions and 0 deletions

View File

@ -56,6 +56,11 @@ class CatchExceptionHandle extends Handle
$e = new FailedException($e->getMessage(), 10005, $e); $e = new FailedException($e->getMessage(), 10005, $e);
} }
// 类型错误
if ($e instanceof \TypeError) {
$e = new FailedException($e->getMessage(), 10005, $e);
}
return parent::render($request, $e); return parent::render($request, $e);
} }

View 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 ]
// +----------------------------------------------------------------------