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


PHP Error::show方法代码示例

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


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

示例1: error

 public function error($message)
 {
     require 'lib/controllers/error.controller.php';
     $error = new Error();
     $error->show($message);
     exit;
 }
开发者ID:rlemon,项目名称:f2chat,代码行数:7,代码来源:bootstrap.class.php

示例2: getList

 public function getList()
 {
     //Run::$DEBUG_PRINT = true;
     $dataList = array();
     $this->prepareList();
     $sql = $this->buildSQL("list", $this->model->dataIntern, $this->model->schema, $this->model->schema_unions);
     $this->queryResult = $this->query->setLog(__LINE__, __FUNCTION__, __CLASS__, __FILE__)->setConnection($this->model->settings['database_id'])->setReturnId()->execute($sql)->getResult();
     //$this->fetchData = $this->queryResult; //$this->query->returnFetchAssoc($this->queryResult);
     Run::$benchmark->writeMark("SelectData/select/buildSQL", "SelectData/select/database->query(sql)");
     if (!$this->queryResult) {
         Error::show(0, "MODEL:: Houve um erro ao executar o select query automaticamente: " . $sql);
     }
     if ($this->queryResult === -2) {
         Error::show(0, "MODEL:: Houve um erro ao executar o select query automaticamente: " . $sql);
     } else {
         if ($this->query->returnNumRows($this->queryResult) > 0) {
             $dataSelectSequencial = $this->buildSQLDataList('list', $this->queryResult, $this->model->schema, $this->model->settings, $this->model->dataIntern);
             Run::$benchmark->writeMark("SelectData/select/Inicio", "SelectData/select/Final");
         }
     }
     $sql_total = $this->buildSQLTotal("list", $this->model->dataIntern, $this->model->schema);
     $total = $this->query->setLog(__LINE__, __FUNCTION__, __CLASS__, __FILE__)->setConnection($this->model->settings['database_id'])->setReturnId()->execute($sql_total)->getResult();
     //$this->queryResult = $this->query->execute($sql, false, false, __LINE__, __FUNCTION__, __CLASS__, __FILE__, $this->model->settings['database_id']);
     //Debug::p($sql);
     //Debug::p($sql_total);
     //Debug::p($dataSelectSequencial);
     //Debug::p($dataSelectTabulated);
     //Debug::p($dataSelectRecursive);
     return array("list" => $dataSelectSequencial, "total" => $total);
     //Debug::p("sql", $sql);
     //exit;
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:32,代码来源:select_data.php

示例3: error

 public function error($exception)
 {
     require 'lib/controllers/error.controller.php';
     $error = new Error();
     $error->show($exception->getMessage() . '<br />Code: ' . $exception->getCode());
     exit;
 }
开发者ID:rlemon,项目名称:pi.rlemon.com,代码行数:7,代码来源:bootstrap.class.php

示例4: getOrderedTables

 public function getOrderedTables($data, $schema)
 {
     $tables_order_ref = $this->prepareOrdertables($schema);
     //-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
     if (count($tables_order_ref) < 1) {
         Error::show(0, "tables_order_ref:: Não foram geradas ordens a serem gravadas");
     }
     //-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
     return $tables_order_ref;
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:10,代码来源:order_data.php

示例5: getPropertiesToSession

 public function getPropertiesToSession($file, $path = false)
 {
     if ($path === false) {
         $file = CONFIG_PATH . "properties/" . $file;
     } else {
         if ($path !== false) {
             $file = $path . $file;
         }
     }
     $name = explode("/", $file);
     $name = $name[count($name) - 1];
     $this->session->set(array('PROPERTIES', $name), false);
     if (strrpos($file, ".properties") < 1) {
         $file_path = $file . ".properties";
     }
     $open_config = fopen($file_path, "r") or Error::show(0, "{$file_path} não foi encontrado ou não pode ser aberto");
     $settings = fread($open_config, filesize($file_path));
     $settings = $this->string->encodeUtf8($settings);
     $settings = explode("\n", $settings);
     $sc = count($settings);
     $i = 0;
     $array_return = array(0);
     foreach ($settings as $k => $linha) {
         $prop = explode("=", $linha);
         $prop[0] = trim($prop[0]);
         // $this->string->clearSpecials(trim($prop[0]));
         $prop[0] = $this->string->removeSpecialsNormalize($prop[0]);
         $p_name = $prop[0];
         unset($prop[0]);
         $p_string = implode("=", $prop);
         if ($p_name != "" && substr(trim($p_name), 0, 1) != "#" && substr(trim($p_name), 0, 1) != "//") {
             $array_return[$p_name] = trim($p_string);
         }
     }
     $propertie_session = $this->session->get(array('PROPERTIES', $name));
     return $propertie_session;
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:37,代码来源:properties.php

示例6: show

 public function show()
 {
     parent::show();
     $this->bye();
     //On arrete le script
 }
开发者ID:Tiger66639,项目名称:symbiose-raspberrypi,代码行数:6,代码来源:ExceptionError.class.php

示例7: multi_query

 public function multi_query($sql, $_line = __LINE__, $_function = __FUNCTION__, $_class = __CLASS__, $_file = __FILE__, $conn = false)
 {
     if ($conn == false) {
         $conn = self::$active;
     }
     Debug::log("Mysql->multi_query: {$sql}", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
     $return = array();
     $result = false;
     if (self::$connection[$conn]) {
         if (mysqli_multi_query(self::$connection[$conn], $sql)) {
             do {
                 if ($result = mysqli_store_result(self::$connection[$conn])) {
                     while ($row = mysqli_fetch_row($result)) {
                         array_push($return, $row[0]);
                     }
                     mysqli_free_result($result);
                 }
                 if (mysqli_more_results(self::$connection[$conn])) {
                     //printf("-----------------\n");
                 }
             } while (mysqli_next_result(self::$connection[$conn]));
             return $return;
         } else {
             Error::sqlError("Erro ao executar QUERY." . " na linha " . $_line . " / " . $_function . " / " . $_class . " ", self::$connection[$conn]->error, $result);
             return -2;
         }
     } else {
         Error::show(5553, "A conexão " . $conn . " não está disponível. Por favor, tente mais tarde. (" . self::$connection[$conn] . ")", $_file, $_line, '');
         return -2;
     }
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:31,代码来源:mysql.php

示例8: getRenderFile

 /**
  * 视图文件
  * 
  * @param string $file
  * @return string
  */
 public function getRenderFile($file = null)
 {
     if (empty($file)) {
         $file = Imp::app()->instance('mvcBuilder')->viewBuilder()->file();
     } else {
         $file = Imp::app()->instance('mvcBuilder')->viewBuilder()->getRenderFile($file);
     }
     if (!is_file($file)) {
         Error::show(Error::getError(Error::$errorType['no_view_file']) . ': ' . $file);
         return;
     }
     return $file;
 }
开发者ID:Rgss,项目名称:imp,代码行数:19,代码来源:View.php

示例9: renderReporting

 public function renderReporting($obj = "", $url_index = false, $link = "?", $gets = "", $name = "items")
 {
     if (!isset($obj->PAGING_TOTAL) || !isset($obj->PAGING)) {
         Error::show(0, "Query:: Há um erro na classe, não será possivel renderizar a paginação corretamente.");
     }
     $html = "";
     if (!$url_index) {
         $html .= "{$link}{$obj->SETTINGS['PAGING_REF']}index=[index]";
     } else {
         $html .= "{$link}/[index]";
     }
     if (isset($_GET[$obj->SETTINGS['PAGING_REF'] . 'ordem'])) {
         $html .= "&{$obj->SETTINGS['PAGING_REF']}ordem=" . $obj->DATA_INT[$obj->SETTINGS['PAGING_REF'] . 'ordem'];
     }
     if (isset($_GET[$obj->SETTINGS['PAGING_REF'] . 'modo'])) {
         $html .= "&{$obj->SETTINGS['PAGING_REF']}modo=" . $obj->DATA_INT[$obj->SETTINGS['PAGING_REF'] . 'modo'];
     }
     if (isset($_GET[$obj->SETTINGS['PAGING_REF'] . 'num'])) {
         $html .= "&{$obj->SETTINGS['PAGING_REF']}num=" . $obj->DATA_INT[$obj->SETTINGS['PAGING_REF'] . 'num'];
     }
     if (isset($_GET[$obj->SETTINGS['PAGING_REF'] . 'busca'])) {
         $html .= "&{$obj->SETTINGS['PAGING_REF']}busca=" . $obj->DATA_INT[$obj->SETTINGS['PAGING_REF'] . 'busca'];
     }
     //		echo "<div class=\"getExcel\"><a href='?".$html."&". $obj->SETTINGS['REF'] ."export=excel' title='Gerar Relatório em Excel'><img src='". Config::$PATH ."cms/img/themes/default/logo_excel.gif' alt='relatório' /></a></div>";
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:25,代码来源:render.php

示例10: queue

 function queue()
 {
     if (!$this->query_transaction) {
         return $this;
     }
     $result = $this->postgre->transactionQuery($this->query_string);
     if (!$result) {
         Error::show(5200, "Model->query->queue() Erro na Transaction: " . $this->postgre->getpostgreError() . __FUNCTION__, __FILE__, __LINE__, '');
         $this->query_transaction = false;
     }
     return $this;
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:12,代码来源:postgre_query.php

示例11: query

 public function query($sql, $returnId = false, $_line = __LINE__, $_function = __FUNCTION__, $_class = __CLASS__, $_file = __FILE__, $conn = false)
 {
     if ($conn == false) {
         $conn = self::$active;
     }
     Debug::log("Postgre->query: {$sql}", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
     if (isset(self::$connection[$conn])) {
         $sql = $this->treatSpecials($sql);
         //self::$connection[$conn]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
         try {
             if ($returnId != false) {
                 $sql .= " RETURNING " . $returnId;
             }
             //echo "<br><br>sql: ".$sql;
             $result = pg_query(self::$connection[$conn], $sql) or Error::show(5552, "Ocorreu um erro na query da conexão " . $conn . ". " . pg_result_error($this->resultQuery) . " / " . pg_last_error(self::$connection[$conn]) . ". Por favor, tente mais tarde. \r\n {$sql}", $_file, $_line, '');
             $id = pg_fetch_row($result);
             $this->lastId = $id[0];
             $this->resultQuery = $result;
             return $this->resultQuery;
         } catch (PDOException $e) {
             Debug::log("Postgre->query: ERRO: " . $e->getMessage() . " na linha " . $_line . " / " . $_function . " / " . $_class . " ", $this->_line, $this->_function, $this->_class, $this->_file);
             Error::sqlError("Erro ao executar QUERY." . " na linha " . $_line . " / " . $_function . " / " . $_class . " ", $e->getMessage(), $sql);
             return -1;
         }
     } else {
         Error::show(5552, "A conexão " . $conn . " não está disponível. Por favor, tente mais tarde.", $_file, $_line, '');
         return -2;
     }
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:29,代码来源:postgre.php

示例12: get_accounts

 /**
  * Get the Bungie account.
  * Get membership information for each console fro the fetched Bungie account.
  * 
  * @throws Exception if the servers are unreachable
  */
 function get_accounts()
 {
     // This endpoint returns relevant data on each console account linked to a Bungie account
     $url = "https://www.bungie.net/platform/user/GetBungieAccount/" . $this->temp_account_id . "/" . $this->console;
     $lookup = file_get_contents($url);
     $response = json_decode(preg_replace('/NaN/', '"NaN"', $lookup));
     if (isset($response->Response->bungieNetUser)) {
         $this->display_name = $response->Response->bungieNetUser->displayName;
     } else {
         $this->display_name = $response->Response->destinyAccounts[0]->userInfo->displayName;
     }
     if (count($response->Response->destinyAccounts) == 0) {
         // No destiny account mean something went wrong (because we looked
         // up the bungie account using a destiny account, so it must exist. DUH)
         $this->error = Error::show(Error::ERROR, "Destiny is in maintenance");
         throw new Exception();
     }
     foreach ($response->Response->destinyAccounts as $account) {
         if ($account->userInfo->membershipType != $this->console && count($response->Response->destinyAccounts) == 1) {
             // This is a weird error. If you only played the Alpha or Beta on a console,
             // but left to play the complete game on another console, this would show up.
             $this->error = Error::show(Error::WARNING, "Account found but played an earlier version of the game");
         }
         $this->add_account($account->userInfo->membershipType, json_decode(json_encode($account->userInfo), true));
     }
 }
开发者ID:ajoyac,项目名称:TimeWastedOnDestiny,代码行数:32,代码来源:request.php

示例13: triggerPeriodicAutoSendMail

 public function triggerPeriodicAutoSendMail()
 {
     ob_clean();
     ob_flush();
     flush();
     if (!$this->database) {
         $this->database = Model::connect($this->connectionID);
     }
     $query = Model::$query;
     $result = $query->select(array('pk_mail', 'fk_user', 'fk_table', 'fk_table_ref', 'from_name', 'from_mail', 'to_name', 'to_mail', 'subject', 'content', 'date_insert', 'status_int'))->from("mail_manager")->where(" status_int = 1 AND sent_status <= 0")->order("pk_mail ASC")->limit(0, Run::MAIL_AUTO_SEND_LIMIT)->execute()->returnAssoc();
     $warMsg = $this->database->getWarning();
     if ($warMsg != "" && $this->database->getError() != "00000") {
         Error::show(5200, "Model-> Erro ao selecionar mailManager:\n " . $warMsg . "\n  " . $this->database->getError() . "  \n{$sql_query} " . __FUNCTION__, __FILE__, __LINE__, '');
     } else {
         if (count($result) == 0) {
             return false;
         }
         foreach ($result as $pk => $field) {
             if ($field['content'] == "") {
                 $result = $query->update("mail_manager")->set(" sent_status = '-3', try_count = try_count+1, status_int = -2, date_update = '" . Run::$control->date->getDateUs() . "'")->where(" pk_mail = '" . $field['pk_mail'] . "'")->execute()->getResult();
                 continue;
             }
             if ($field['from_mail'] == "") {
                 $result = $query->update("mail_manager")->set(" sent_status = '-4', try_count = try_count+1, status_int = -2, date_update = '" . Run::$control->date->getDateUs() . "'")->where(" pk_mail = '" . $field['pk_mail'] . "'")->execute()->getResult();
                 continue;
             }
             if ($field['to_mail'] == "") {
                 $result = $query->update("mail_manager")->set(" sent_status = '-5', try_count = try_count+1, status_int = -2, date_update = '" . Run::$control->date->getDateUs() . "'")->where(" pk_mail = '" . $field['pk_mail'] . "'")->execute()->getResult();
                 continue;
             }
             $this->ref_pk = $field['pk_mail'];
             $field['content'] = str_replace('[id]', $field['pk_mail'], $field['content']);
             $this->setFrom($field['from_mail'], $field['from_name']);
             $this->setTo($field['to_mail'], $field['to_name']);
             $this->setMessage($field['content']);
             $this->setSubject($field['subject']);
             $resultSend = $this->send();
             $result = $query->update("mail_manager")->set(" sent_status = '" . $resultSend . "', try_count = try_count+1, date_update = '" . Run::$control->date->getDateUs() . "'")->where(" pk_mail = '" . $field['pk_mail'] . "'")->execute()->getResult();
             if ((is_integer($result) || $warMsg != "") && $this->database->getError() != "00000") {
                 Error::show(5200, "Model-> Erro ao atualizar mailManager:\n " . $warMsg . "\n  " . $this->database->getError() . "  \n{$sql_query} " . __FUNCTION__, __FILE__, __LINE__, '');
             }
             Debug::p("enviado {$resultSend}", $field);
             flush();
             sleep(1);
         }
     }
     return true;
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:48,代码来源:mailManager.php

示例14: deletePKFromMultipleRegistersTable

 private function deletePKFromMultipleRegistersTable($refs, $table, $schema)
 {
     //	//Debug::p("deletePKFromMultipleRegistersTable ".$table, $this->dataDeletes);
     foreach ($this->dataDeletes[$table] as $k => $v) {
         // $sql_query 	= "DELETE FROM ". $refs['table'] ." WHERE ". $refs['pk'] ." = ". $v ."";
         // USANDO DELETE LÓGICO
         $updateTime = $this->getDateUpdateName($refs, $schema);
         $sql_query = "UPDATE " . $refs['table'] . " SET {$updateTime} " . $refs['status_name'] . "='-1'  WHERE " . $refs['pk'] . " = {$v} ";
         //Debug::p("SQL_DELETE", $sql_query);
         $sql_obj = $this->database->query($sql_query, __LINE__, __FUNCTION__, __CLASS__, __FILE__, $this->settings['database_id']);
         //Debug::p($this->database->getError());
         $warMsg = $this->database->getWarning();
         if (is_integer($sql_obj) || $warMsg != "") {
             $this->query_errors++;
             Error::show(5200, "Model-> Erro ao deletar multiplo registro não selecionado no form:\n " . $warMsg . "\n  " . $this->database->getError() . "  \n{$sql_query}" . __FUNCTION__, __FILE__, __LINE__, '');
         } else {
             $log = "Model: SQL Executado com sucesso (returnID:" . $this->database->getID($this->settings['database_id']) . "): \n {$sql_query}";
             // Debug::print_r($log);
             // Debug::log($log, __LINE__, __FUNCTION__, __CLASS__, __FILE__);
         }
     }
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:22,代码来源:save_data.php

示例15: loadPageContent

 private function loadPageContent($pag)
 {
     Debug::log("Router - loadPageContent() ", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
     $class = ucwords(str_replace("-", "_", $pag)) . "Controller";
     $method = isset(self::$levels[$this->level_to_load_method]) ? self::$levels[$this->level_to_load_method] : "index";
     $method = $this->checkFullUrlExist($class, $method);
     //Debug::p($class, $method);
     //echo "CHECK $class, $method :".method_exists($class,$method);
     //exit;
     if (class_exists($class)) {
         self::$controller = new $class();
         //Debug::print_r("acceptNextIndexUnknownLevels: ".self::$controller->acceptNextIndexUnknownLevels);
     }
     if (class_exists($class) && method_exists($class, $method)) {
         for ($i = self::$levelRef + 2; $i < self::$levelRef; $i++) {
             $this->{$params}[$i - (self::$levelRef + 2)] = self::$levels[$i];
         }
         Debug::log("Router->loadPageContent : Chamando metodo {$method} para a URL. (control/" . $pag . "_control.php) - {$class}");
         Action::registerAccess();
         Run::$ajaxMethod->start();
         if (!isset(self::$controller->autoLoadMethod) || self::$controller->autoLoadMethod !== false) {
             Run::$benchmark->writeMark("startRouter/Inicio", "loadPageContent/if/controller/method");
             self::$controller->{$method}();
         }
     } else {
         if ((int) self::$controller->acceptNextIndexUnknownLevels > 0) {
             if (!isset(self::$controller->autoLoadMethod) || self::$controller->autoLoadMethod !== false) {
                 $method = "index";
                 Debug::log("Router->loadPageContent : Chamando metodo index/{self::{$controller->acceptNextIndexUnknownLevels}} para a URL. (control/" . $pag . "_control.php) - {$class}");
                 Action::registerAccess();
                 Run::$benchmark->writeMark("startRouter/Inicio", "loadPageContent/else/controller/method");
                 if (method_exists($class, $method)) {
                     self::$controller->{$method}();
                 } else {
                     Error::show(8, "Router->loadPageContent: Metodo <b>{$method}</b> não existe. {self::{$controller->acceptNextUnknownLevels}} (control/" . $pag . "_control.php).", __FILE__, __LINE__);
                     $this->load("404");
                 }
             }
         } else {
             if (!class_exists($class)) {
                 Error::show(8, "Router->loadPageContent: Classe <b>{$class}</b> não existe. (control/" . $pag . "_control.php).", __FILE__, __LINE__);
             } else {
                 Error::show(8, "Router->loadPageContent: Metodo <b>{$method}</b> não existe. {self::{$controller->acceptNextUnknownLevels}} (control/" . $pag . "_control.php).", __FILE__, __LINE__);
             }
             echo "<!-- {$class} ou {$method} não existe -->";
             $this->load("404");
         }
     }
     $this->flush();
     //Run::$benchmark->writeMark("loadPageContent1", "loadPageContent2");
 }
开发者ID:obscurun,项目名称:run-dev,代码行数:51,代码来源:router.php


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