Merge "(Bug 41352) Provide tests for edit conflicts."
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 3aa51b7..91b8cc8 100644 (file)
@@ -119,7 +119,7 @@ class ApiMain extends ApiBase {
                        'msg' => 'Use of the write API',
                        'params' => array()
                ),
-               'apihighlimits' => array(
+               'apihighlimits' => array(
                        'msg' => 'Use higher limits in API queries (Slow queries: $1 results; Fast queries: $2 results). The limits for slow queries also apply to multivalue parameters.',
                        'params' => array( ApiBase::LIMIT_SML2, ApiBase::LIMIT_BIG2 )
                )
@@ -376,7 +376,12 @@ class ApiMain extends ApiBase {
 
                        // 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.