Skip to content
Browse files

MDL-20374 default exception handler: log backtrace to webserver log i…

…f DEBUG_MINIMAL or greater.
  • Loading branch information...
1 parent dedb239 commit 89781f3c0ed7bb6d61d1d1dfdbf9c4cb98ad0661 ashleyholman committed Sep 29, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/setuplib.php
View
4 lib/setuplib.php
@@ -214,6 +214,10 @@ function default_exception_handler($ex, $isupgrade = false, $plugin = null) {
echo $OUTPUT->fatal_error($message, $moreinfourl, $link, $backtrace, $debuginfo);
}
+ $errmsg = "Default exception handler: " . $ex->getMessage() . "\n" . format_backtrace($backtrace);
+ if (debugging($errmsg, DEBUG_MINIMAL)) {
+ error_log($errmsg, 0);
+ }
exit(1); // General error code
}

0 comments on commit 89781f3

Please sign in to comment.
Something went wrong with that request. Please try again.