Skip to content

Commit

Permalink
Show more information in case everything goes very wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoboss committed Nov 26, 2021
1 parent ed868f7 commit 6537f1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/Core/src/Core.php
Expand Up @@ -305,8 +305,11 @@ public static function handleException(Throwable $throwable): void

try {
$handlerContainer->findHandler($exceptionContext)->handle($exceptionContext);
} catch (Throwable) {
echo "Could not handle exception. " . $throwable->getMessage();
} catch (Throwable $innerThrowable) {
echo "Could not handle exception. " . $throwable->getMessage() . "\n";
echo "\n";
echo "Additionally, the exception handler threw an exception while trying to handle the first exception: " . $innerThrowable->getMessage() . "\n";
echo $innerThrowable->getTraceAsString();

exit(2);
}
Expand Down

0 comments on commit 6537f1d

Please sign in to comment.