File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -300,12 +300,17 @@ public function exceptionHandler(Throwable $exception): void
300
300
}
301
301
// @codeCoverageIgnoreEnd
302
302
303
+ echo $ this ->renderHtmlException ($ exception );
304
+ }
305
+
306
+ public function renderHtmlException (Throwable $ exception ): string
307
+ {
303
308
$ ajax = (isset ($ _SERVER ) && isset ($ _SERVER ['X_REQUESTED_WITH ' ]) && 'XMLHttpRequest ' === $ _SERVER ['X_REQUESTED_WITH ' ]);
304
309
$ output = '' ;
305
310
if (! $ ajax ) {
306
- $ output .= '<!DOCTYPE html><html><head><title>500: Errore interno </title></head><body> ' ;
311
+ $ output .= '<!DOCTYPE html><html><head><title>500: Internal Server Error </title></head><body> ' ;
307
312
}
308
- $ output .= '<h1>500: Errore interno </h1> ' ;
313
+ $ output .= '<h1>500: Internal Server Error </h1> ' ;
309
314
$ output .= \PHP_EOL ;
310
315
if ($ this ->displayErrors ()) {
311
316
$ currentEx = $ exception ;
@@ -333,7 +338,7 @@ public function exceptionHandler(Throwable $exception): void
333
338
$ output .= '</body></html> ' ;
334
339
}
335
340
336
- echo $ output ;
341
+ return $ output ;
337
342
}
338
343
339
344
private function outputError (string $ text ): void
You can’t perform that action at this time.
0 commit comments