当前位置: 首页>>代码示例>>PHP>>正文


PHP Error::getErrorMessage方法代码示例

本文整理汇总了PHP中Error::getErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Error::getErrorMessage方法的具体用法?PHP Error::getErrorMessage怎么用?PHP Error::getErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Error的用法示例。


在下文中一共展示了Error::getErrorMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AddError

 /**
  * Adds an error to the $_SESSION error-array, or outputs it to STERR.
  * @param Error $InError
  */
 public static function AddError($InError)
 {
     global $argv, $argc;
     if (isset($argv) && $argc > 0) {
         fwrite(STDERR, html_entity_decode($InError->getErrorMessage(), ENT_COMPAT, 'UTF-8') . "\n");
     } else {
         $Errors = unserialize($_SESSION['Errors']);
         $Errors[] = $InError;
         $_SESSION['Errors'] = serialize($Errors);
     }
 }
开发者ID:laiello,项目名称:candydolldb,代码行数:15,代码来源:class.error.php

示例2: sendError

 /**
  * 发送错误信息
  * @param integer $status 状态码
  * @param string $content_type 状态信息
  */
 public function sendError($errorCode, $data = '', $status = RestStatus::STATUS_PHP_ERROR, $content_type = 'application/json')
 {
     // set the header
     header("Cache-Control:no-cache");
     $status_header = 'HTTP/1.1 ' . $status . ' ' . RestStatus::getStatusMessage($status);
     header($status_header);
     header('Content-type: ' . $content_type);
     $response = array('code' => $errorCode, 'message' => Error::getErrorMessage($errorCode), 'data' => $data);
     echo json_encode($response);
     exit;
 }
开发者ID:aslijiasheng,项目名称:ciFramework,代码行数:16,代码来源:Core_Controller.php

示例3: renderWidget

 public function renderWidget($ps_widget_id, &$pa_settings)
 {
     parent::renderWidget($ps_widget_id, $pa_settings);
     $this->opo_view->setVar('request', $this->getRequest());
     $this->opo_view->setVar('hours', $pa_settings['hours']);
     $vo_tq = new TaskQueue();
     $qr_completed = $this->opo_db->query("\n\t\t\t\tSELECT tq.*, u.fname, u.lname \n\t\t\t\tFROM ca_task_queue tq \n\t\t\t\tLEFT JOIN ca_users u ON u.user_id = tq.user_id \n\t\t\t\tWHERE tq.completed_on > ? \n\t\t\t\tORDER BY tq.completed_on desc\n\t\t\t", time() - 60 * 60 * $pa_settings['hours']);
     $va_completed = array();
     while ($qr_completed->nextRow()) {
         $va_row = $qr_completed->getRow();
         $va_params = caUnserializeForDatabase($va_row["parameters"]);
         $va_completed[$va_row["task_id"]]["handler_name"] = $vo_tq->getHandlerName($va_row['handler']);
         $va_completed[$va_row["task_id"]]["created"] = $va_row["created_on"];
         $va_completed[$va_row["task_id"]]["by"] = $va_row["fname"] . ' ' . $va_row['lname'];
         $va_completed[$va_row["task_id"]]["completed_on"] = $va_row["completed_on"];
         $va_completed[$va_row["task_id"]]["error_code"] = $va_row["error_code"];
         if ((int) $va_row["error_code"] > 0) {
             $o_e = new Error((int) $va_row["error_code"], '', '', '', false, false);
             $va_row["error_message"] = $o_e->getErrorMessage();
         } else {
             $va_row["error_message"] = '';
         }
         $va_completed[$va_row["task_id"]]["error_message"] = $va_row["error_message"];
         if (is_array($va_report = caUnserializeForDatabase($va_row["notes"]))) {
             $va_completed[$va_row["task_id"]]["processing_time"] = (double) $va_report['processing_time'];
         }
         $va_completed[$va_row["task_id"]]["status"] = $vo_tq->getParametersForDisplay($va_row);
     }
     $this->opo_view->setVar('jobs_done', $qr_completed->numRows());
     $this->opo_view->setVar('jobs_done_data', $va_completed);
     $qr_qd = $this->opo_db->query("\n\t\t\t\tSELECT * \n\t\t\t\tFROM ca_task_queue tq\n\t\t\t\tLEFT JOIN ca_users AS u ON tq.user_id = u.user_id\n\t\t\t\tWHERE tq.completed_on is NULL\n\t\t\t");
     $this->opo_view->setVar('jobs_queued_processing', $qr_qd->numRows());
     $va_qd_jobs = array();
     $va_pr_jobs = array();
     while ($qr_qd->nextRow()) {
         $va_row = $qr_qd->getRow();
         $va_params = caUnserializeForDatabase($va_row["parameters"]);
         if (!$vo_tq->rowKeyIsBeingProcessed($va_row["row_key"])) {
             $va_qd_jobs[$va_row["task_id"]]["handler_name"] = $vo_tq->getHandlerName($va_row['handler']);
             $va_qd_jobs[$va_row["task_id"]]["created"] = $va_row["created_on"];
             $va_qd_jobs[$va_row["task_id"]]["by"] = $va_row["fname"] . ' ' . $va_row['lname'];
             $va_qd_jobs[$va_row["task_id"]]["status"] = $vo_tq->getParametersForDisplay($va_row);
         } else {
             $va_pr_jobs[$va_row["task_id"]]["handler_name"] = $vo_tq->getHandlerName($va_row['handler']);
             $va_pr_jobs[$va_row["task_id"]]["created"] = $va_row["created_on"];
             $va_pr_jobs[$va_row["task_id"]]["by"] = $va_row["fname"] . ' ' . $va_row['lname'];
             $va_pr_jobs[$va_row["task_id"]]["status"] = $vo_tq->getParametersForDisplay($va_row);
         }
     }
     $this->opo_view->setVar('qd_job_data', $va_qd_jobs);
     $this->opo_view->setVar('pr_job_data', $va_pr_jobs);
     $this->opo_view->setVar('update_frequency', ($vn_freq = (int) $this->opo_config->get('update_frequency')) ? $vn_freq : 60);
     return $this->opo_view->render('main_html.php');
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:54,代码来源:trackProcessingWidget.php

示例4: Show

 function Show()
 {
     $va_nums = explode(';', $this->request->getParameter('n', pString));
     $va_error_messages = array();
     if (is_array($va_nums)) {
         $o_err = new Error(0, '', '', '', false, false);
         foreach ($va_nums as $vn_error_number) {
             $o_err->setError($vn_error_number, '', '', false, false);
             $va_error_messages[] = $o_err->getErrorMessage();
         }
     }
     $this->view->setVar('error_messages', $va_error_messages);
     $this->view->setVar('referrer', $this->request->getParameter('r', pString));
     $this->render('error_html.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:15,代码来源:ErrorController.php

示例5: Show

 function Show()
 {
     $o_purify = new HTMLPurifier();
     $va_nums = explode(';', $this->request->getParameter('n', pString));
     $va_error_messages = $this->notification->getNotifications();
     if ((!is_array($va_error_messages) || sizeof($va_error_messages) == 0) && is_array($va_nums)) {
         $o_err = new Error(0, '', '', '', false, false);
         foreach ($va_nums as $vn_error_number) {
             $o_err->setError($vn_error_number, '', '', false, false);
             $va_error_messages[] = $o_err->getErrorMessage();
         }
     }
     $this->view->setVar('error_messages', $va_error_messages);
     $this->view->setVar('referrer', $o_purify->purify($this->request->getParameter('r', pString)));
     $this->render('error_html.php');
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:16,代码来源:ErrorController.php


注:本文中的Error::getErrorMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。