This commit is contained in:
2021-07-27 14:10:54 +08:00
parent 9e36ea7983
commit b0362ea68f
+1 -2
View File
@@ -3,7 +3,6 @@
namespace Server; namespace Server;
use Exception; use Exception;
use HttpServer\Exception\ExitException;
use HttpServer\Http\Request as HRequest; use HttpServer\Http\Request as HRequest;
use HttpServer\Http\Response as HResponse; use HttpServer\Http\Response as HResponse;
use HttpServer\Route\Router; use HttpServer\Route\Router;
@@ -113,7 +112,7 @@ class HTTPServerListener extends Abstracts\Server
} }
} catch (Error | Throwable $exception) { } catch (Error | Throwable $exception) {
$sResponse->addHeader('Content-Type', 'text/html; charset=utf-8'); $sResponse->addHeader('Content-Type', 'text/html; charset=utf-8');
$sResponse->send(jTraceEx($exception), $sResponse->send(jTraceEx($exception, null, true),
$exception->getCode() == 0 ? 500 : $exception->getCode()); $exception->getCode() == 0 ? 500 : $exception->getCode());
} finally { } finally {
$this->_event->dispatch(Event::SYSTEM_RESOURCE_RELEASES); $this->_event->dispatch(Event::SYSTEM_RESOURCE_RELEASES);