When the API catches a non-API exception, it logs the message but does
not record the backtrace. It should honor $wgLogExceptionBacktrace
(added in 1.20) to decide whether to log the backtrace or just the
message.
Change-Id: I33fcbebd0e41dc2fda0cd00f8779e013300c0494
disabled, and don't wrap HTML-syntax definition lists in paragraphs.
* (bug 41409) Diffs while editing an old revision should again diff against the
current revision.
+* (bug 41494) Honor $wgLogExceptionBacktrace when logging non-API exceptions
+ caught during API execution.
=== API changes in 1.21 ===
* prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt
// Log it
if ( !( $e instanceof UsageException ) ) {
- wfDebugLog( 'exception', $e->getLogMessage() );
+ global $wgLogExceptionBacktrace;
+ if ( $wgLogExceptionBacktrace ) {
+ wfDebugLog( 'exception', $e->getLogMessage() . "\n" . $e->getTraceAsString() . "\n" );
+ } else {
+ wfDebugLog( 'exception', $e->getLogMessage() );
+ }
}
// Handle any kind of exception by outputing properly formatted error message.