- $this->getResult()->reset();
- $this->getResult()->disableSizeCheck();
- // Re-add the id
- $requestid = $this->getParameter( 'requestid' );
- if ( !is_null( $requestid ) )
- $this->getResult()->addValue( null, 'requestid', $requestid );
- $this->getResult()->addValue( null, 'error', $errMessage );
+ $errMessage = array (
+ 'code' => 'internal_api_error_' . get_class( $e ),
+ 'info' => $info,
+ );
+ ApiResult :: setContent( $errMessage, $wgShowExceptionDetails ? "\n\n{$e->getTraceAsString()}\n\n" : "" );
+ }
+
+ $this->getResult()->reset();
+ $this->getResult()->disableSizeCheck();
+ // Re-add the id
+ $requestid = $this->getParameter( 'requestid' );
+ if ( !is_null( $requestid ) )
+ $this->getResult()->addValue( null, 'requestid', $requestid );
+ $this->getResult()->addValue( null, 'error', $errMessage );