Skip to content

Commit

Permalink
调整:异常导出
Browse files Browse the repository at this point in the history
  • Loading branch information
dxkite committed Mar 1, 2020
1 parent de3a90a commit f395b9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 3 additions & 4 deletions suda/src/application/Application.php
Expand Up @@ -7,10 +7,9 @@
use suda\framework\Request;
use suda\framework\Response;
use suda\framework\http\Status;
use suda\framework\loader\Loader;
use suda\framework\route\MatchResult;
use suda\application\template\Template;
use suda\application\debug\RequestDumper;
use suda\application\debug\RequestDumpCatcher;
use suda\application\loader\ModuleLoader;
use suda\database\exception\SQLException;
use suda\application\template\RawTemplate;
Expand All @@ -32,7 +31,7 @@
class Application extends ApplicationRoute
{
/**
* @var RequestDumper
* @var ExceptionCatcher
*/
protected $catcher;

Expand Down Expand Up @@ -67,7 +66,7 @@ protected function prepare(Request $request, Response $response)
$response->setHeader('x-powered-by', 'suda/' . SUDA_VERSION, true);
$response->getWrapper()->register(ExceptionContentWrapper::class, [Throwable::class]);
$response->getWrapper()->register(TemplateWrapper::class, [RawTemplate::class]);
$this->setCatcher(new RequestDumper($this, $request, $response));
$this->setCatcher(new RequestDumpCatcher($this, $request, $response));

$this->debug->info('{request-time} {remote-ip} {request-method} {request-uri} debug={debug}', [
'remote-ip' => $request->getRemoteAddr(),
Expand Down
@@ -1,19 +1,15 @@
<?php
namespace suda\application\debug;

use Exception;
use Throwable;
use suda\framework\Request;
use suda\framework\Response;
use suda\application\Application;
use suda\framework\debug\DebugObject;
use suda\framework\filesystem\FileSystem;

/**
* Class RequestDumper
* @package suda\application
*/
class RequestDumper extends ExceptionCatcher
class RequestDumpCatcher extends ExceptionCatcher
{
/**
* @var Response
Expand Down

0 comments on commit f395b9c

Please sign in to comment.