改进Error类的appException方法 异常页面发送404信息

简化E快捷方法写法
添加T快捷方法 用于快捷导入Traits
This commit is contained in:
ThinkPHP
2013-04-17 21:20:53 +08:00
parent 7b91d3eb72
commit 1386280ffd
2 changed files with 21 additions and 13 deletions

View File

@@ -29,6 +29,12 @@ class Error {
$error['line'] = $e->getLine();
}
$error['trace'] = $e->getTraceAsString();
// 记录异常日志
Log::record($error['message'],'ERR');
// 发送404信息
header('HTTP/1.1 404 Not Found');
header('Status:404 Not Found');
// 输出异常页面
self::halt($error);
}