Beispiel #1
0
 /**
  * Output a report about the exception and takes care of formatting.
  * It will be either HTML or plain text based on isCommandLine().
  */
 function report()
 {
     $log = $this->getLogMessage();
     if ($log) {
         wfDebugLog('exception', $log);
         Wikia::log('exceptions-WIKIA', get_class($this), $log, true);
         // Wikia change - @author macbre (BAC-1199)
     }
     if (self::isCommandLine()) {
         MWExceptionHandler::printError($this->getText());
     } else {
         $this->reportHTML();
     }
 }
Beispiel #2
0
 /**
  * Output a report about the exception and takes care of formatting.
  * It will be either HTML or plain text based on isCommandLine().
  */
 function report()
 {
     global $wgMimeType;
     MWExceptionHandler::logException($this);
     if (defined('MW_API')) {
         // Unhandled API exception, we can't be sure that format printer is alive
         header('MediaWiki-API-Error: internal_api_error_' . get_class($this));
         wfHttpError(500, 'Internal Server Error', $this->getText());
     } elseif (self::isCommandLine()) {
         MWExceptionHandler::printError($this->getText());
     } else {
         header('HTTP/1.1 500 MediaWiki exception');
         header('Status: 500 MediaWiki exception', true);
         header("Content-Type: {$wgMimeType}; charset=utf-8", true);
         $this->reportHTML();
     }
 }
Beispiel #3
0
 /**
  * Output a report about the exception and takes care of formatting.
  * It will be either HTML or plain text based on isCommandLine().
  */
 function report()
 {
     $log = $this->getLogMessage();
     if ($log) {
         wfDebugLog('exception', $log);
     }
     if (self::isCommandLine()) {
         MWExceptionHandler::printError($this->getText());
     } else {
         $this->reportHTML();
     }
 }
 /**
  * Output a report about the exception and takes care of formatting.
  * It will be either HTML or plain text based on isCommandLine().
  */
 function report()
 {
     global $wgLogExceptionBacktrace;
     $log = $this->getLogMessage();
     if ($log) {
         if ($wgLogExceptionBacktrace) {
             wfDebugLog('exception', $log . "\n" . $this->getTraceAsString() . "\n");
         } else {
             wfDebugLog('exception', $log);
         }
     }
     if (defined('MW_API')) {
         // Unhandled API exception, we can't be sure that format printer is alive
         header('MediaWiki-API-Error: internal_api_error_' . get_class($this));
         wfHttpError(500, 'Internal Server Error', $this->getText());
     } elseif (self::isCommandLine()) {
         MWExceptionHandler::printError($this->getText());
     } else {
         header("HTTP/1.1 500 MediaWiki exception");
         header("Status: 500 MediaWiki exception", true);
         $this->reportHTML();
     }
 }