mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修正异常处理和单元测试
This commit is contained in:
@@ -13,6 +13,8 @@ namespace think\exception;
|
||||
|
||||
use Exception;
|
||||
use think\Config;
|
||||
use think\Console;
|
||||
use think\console\Output;
|
||||
use think\Log;
|
||||
use think\Response;
|
||||
|
||||
@@ -79,6 +81,15 @@ class Handle
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $output
|
||||
* @param Exception $e
|
||||
*/
|
||||
public function renderForConsole(Output $output, Exception $e)
|
||||
{
|
||||
(new Console)->renderException($e, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param HttpException $e
|
||||
* @return \think\Response
|
||||
@@ -110,8 +121,7 @@ class Handle
|
||||
'code' => $this->getCode($exception),
|
||||
'source' => $this->getSourceCode($exception),
|
||||
'datas' => $this->getExtendData($exception),
|
||||
|
||||
'tables' => [
|
||||
'tables' => [
|
||||
'GET Data' => $_GET,
|
||||
'POST Data' => $_POST,
|
||||
'Files' => $_FILES,
|
||||
|
||||
Reference in New Issue
Block a user