mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
@@ -63,9 +63,12 @@ class Error
|
|||||||
*/
|
*/
|
||||||
public static function appError($errno, $errstr, $errfile = '', $errline = 0, $errcontext = [])
|
public static function appError($errno, $errstr, $errfile = '', $errline = 0, $errcontext = [])
|
||||||
{
|
{
|
||||||
|
$exception = new ErrorException($errno, $errstr, $errfile, $errline, $errcontext);
|
||||||
if (error_reporting() & $errno) {
|
if (error_reporting() & $errno) {
|
||||||
// 将错误信息托管至 think\exception\ErrorException
|
// 将错误信息托管至 think\exception\ErrorException
|
||||||
throw new ErrorException($errno, $errstr, $errfile, $errline, $errcontext);
|
throw $exception;
|
||||||
|
}else{
|
||||||
|
self::getExceptionHandler()->report($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user