本文整理匯總了PHP中type::getMessage方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::getMessage方法的具體用法?PHP type::getMessage怎麽用?PHP type::getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類type
的用法示例。
在下文中一共展示了type::getMessage方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pushEvent
/**
* Static since a store config exception (caused by a module config error) cannot call magento's model objects.
* If a store config exception occurs, the exception class logs it drect.
*
* @param type $e
*/
public static function pushEvent($e, $setAppName = true)
{
if (extension_loaded('newrelic')) {
$message = $e->getMessage();
$message = empty($message) ? get_class($e) : $message;
if ($setAppName) {
Mage::Helper('newrelic')->setAppName();
}
newrelic_notice_error($message, $e);
}
}
示例2: handleReqException
/**
* Exception handler.
*
* @global type $document
* @global array $totalFailure
* @global boolean $responding
* @global type $standalone
* @param type $e
*/
function handleReqException($e)
{
global $document, $totalFailure, $responding, $standalone;
$responding = true;
$message = 'Exception: "' . $e->getMessage() . '" in ' . $e->getFile() . ' L' . $e->getLine() . "\n";
foreach ($e->getTrace() as $stackLevel) {
$message .= $stackLevel['file'] . ' L' . $stackLevel['line'] . ' ';
if ($stackLevel['class'] != '') {
$message .= $stackLevel['class'];
$message .= '->';
}
$message .= $stackLevel['function'];
$message .= "();\n";
}
$message = str_replace('{scenario}', 'uncaught exception', $totalFailure[0] . $message . $totalFailure[1]);
echo strtr($document, array('{headerContent}' => '', '{bodyContent}' => $message));
RIP();
}
示例3: exception_error
/**
* 異常處理
* @param type $e
*/
function exception_error($e)
{
echo $e->getMessage();
}
示例4: error
/**
* Error handler
*
* @param type $err
*/
function error($err)
{
print_r($err->getMessage());
}
示例5: catch_exception
/**
* Exception Handler
*
* @internal
* @static
* @param type $exception
*/
public static function catch_exception($exception)
{
argent_logger::log_event('Exception', $exception->getMessage());
echo "Argent Exception: " . $exception->getMessage();
}
示例6: error
/**
*
*
* @param type $trace
* @param type $error
*/
public static function error($trace, $error)
{
echo '<br>' . '<b>Fatal error</b>: ' . $error->getMessage() . ' in method <strong>' . $trace[0]['function'] . '</strong> ' . 'called at <strong>' . $trace[0]['file'] . '</strong> on line <strong>' . $trace[0]['line'] . '</strong>' . "<br>";
die;
}
示例7: errorAction
/**
* 異常數據報錯
* @param type $e
*/
protected function errorAction($e, array $config, $action = 'execute')
{
$error = $this->PDOStatement->errorInfo();
//記錄日誌報錯情況[]
$this->logWrite($e->getCode() . ":" . $e->getMessage());
if ($error[1] == 2006 || $error[1] == 2013) {
$this->_linkcount++;
//重連次數+1
if ($this->_linkcount < $this->_linkCount) {
//服務器重連接
$this->resetConnect();
return $this->{$action}($config[0], $config[1]);
} else {
return false;
}
}
}