This commit is contained in:
2023-04-24 11:09:28 +08:00
parent 1b3913e60f
commit 48c925cbcf
2 changed files with 2 additions and 2 deletions
+2
View File
@@ -22,9 +22,11 @@ class ExceptionHandlerDispatcher implements ExceptionHandlerInterface
* @param Throwable $exception
* @param object $response
* @return ResponseInterface
* @throws
*/
public function emit(Throwable $exception, object $response): ResponseInterface
{
error($exception);
$response->withContentType(ContentType::HTML)->withBody(new Stream(jTraceEx($exception, null, true)));
if ($exception->getCode() == 404) {
return $response->withStatus(404);