From 378cdf3403861de047a703173f9a2f283c9ed194 Mon Sep 17 00:00:00 2001 From: tsingsun Date: Thu, 2 Jun 2016 17:24:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AF=B9appError=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充记录error的记录 --- library/think/Error.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/think/Error.php b/library/think/Error.php index 9de97c88..140fbb24 100644 --- a/library/think/Error.php +++ b/library/think/Error.php @@ -63,9 +63,12 @@ class Error */ public static function appError($errno, $errstr, $errfile = '', $errline = 0, $errcontext = []) { + $exception = new ErrorException($errno, $errstr, $errfile, $errline, $errcontext); if (error_reporting() & $errno) { // 将错误信息托管至 think\exception\ErrorException - throw new ErrorException($errno, $errstr, $errfile, $errline, $errcontext); + throw $exception; + }else{ + self::getExceptionHandler()->report($exception); } }