当前位置: 首页>>代码示例>>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;未经允许,请勿转载。