當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MWExceptionHandler::printError方法代碼示例

本文整理匯總了PHP中MWExceptionHandler::printError方法的典型用法代碼示例。如果您正苦於以下問題:PHP MWExceptionHandler::printError方法的具體用法?PHP MWExceptionHandler::printError怎麽用?PHP MWExceptionHandler::printError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MWExceptionHandler的用法示例。


在下文中一共展示了MWExceptionHandler::printError方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: report

 /**
  * 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();
     }
 }
開發者ID:yusufchang,項目名稱:app,代碼行數:18,代碼來源:Exception.php

示例2: report

 /**
  * 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();
     }
 }
開發者ID:biribogos,項目名稱:wikihow-src,代碼行數:21,代碼來源:Exception.php

示例3: report

 /**
  * 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();
     }
 }
開發者ID:eFFemeer,項目名稱:seizamcore,代碼行數:16,代碼來源:Exception.php

示例4: report

 /**
  * 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();
     }
 }
開發者ID:Grprashanthkumar,項目名稱:ColfusionWeb,代碼行數:27,代碼來源:Exception.php


注:本文中的MWExceptionHandler::printError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。