Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore global exception file name and number, and stack trace logging #1549

Merged
merged 2 commits into from
Aug 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configuration/linker.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ function handle_uncaught_exception($exception)

$logger->err(array( 'message' => 'Exception Code: '.$exception->getCode()));
$logger->err(array( 'message' => 'Message: '.$exception->getMessage()));
$logger->info(array( 'message' => 'Origin: '.$exception->getFile().' (line '.$exception->getLine().')'));
$logger->err(array( 'message' => 'Origin: '.$exception->getFile().' (line '.$exception->getLine().')'));

$stringTrace = (get_class($exception) == 'UniqueException') ? $exception->getVerboseTrace() : $exception->getTraceAsString();

$logger->info(array('message' => "Trace:\n".$stringTrace."\n-------------------------------------------------------"));
$logger->err(array('message' => "Trace:\n".$stringTrace."\n-------------------------------------------------------"));

// If working in a server context, build headers to output.
$httpCode = 500;
Expand Down