This commit is contained in:
2020-09-09 12:08:07 +08:00
parent 4d0ac47984
commit e82d2212e7
3 changed files with 33 additions and 36 deletions
+1 -5
View File
@@ -425,11 +425,7 @@ class Router extends Application implements RouterInterface
$response = send($node->dispatch(), 200);
}
} catch (\Throwable $exception) {
$trance = JSON::to(500, $exception->getMessage(), [
'file' => $exception->getFile(),
'line' => $exception->getLine()
]);
$response = send($trance, 200);
$response = send(Snowflake::app()->getLogger()->exception($exception), 200);
} finally {
if (!($node instanceof Node) || !$node->hasAfter()) {
return;