本文整理匯總了PHP中CakeBaseReporter::paintException方法的典型用法代碼示例。如果您正苦於以下問題:PHP CakeBaseReporter::paintException方法的具體用法?PHP CakeBaseReporter::paintException怎麽用?PHP CakeBaseReporter::paintException使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CakeBaseReporter
的用法示例。
在下文中一共展示了CakeBaseReporter::paintException方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: paintException
/**
* Paint exception faildetail to STDERR.
*
* @param object $exception Exception instance
* @return void
* @access public
*/
function paintException($exception)
{
parent::paintException($exception);
$message = sprintf('Unexpected exception of type [%s] with message [%s] in [%s] line [%s]', get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine());
$message .= $this->_getBreadcrumb();
fwrite(STDERR, 'EXCEPTION' . $this->separator . $message);
}
示例2: paintException
/**
* Paints a PHP exception.
*
* @param Exception $exception Exception to display.
* @return void
* @access public
*/
function paintException($exception)
{
parent::paintException($exception);
echo "<li class='fail'>\n";
echo "<span>Exception</span>";
$message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
echo "<div class='msg'>" . $this->_htmlEntities($message) . "</div>\n";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
echo "<div>" . implode(" -> ", $breadcrumb) . "</div>\n";
echo "</li>\n";
}
示例3: paintException
/**
* Paints a PHP exception.
*
* @param Exception $exception Exception to describe.
* @return void
* @access public
*/
function paintException($exception)
{
parent::paintException($exception);
$message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
echo "Exception " . $this->getExceptionCount() . "!\n{$message}\n";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
echo "\tin " . implode("\n\tin ", array_reverse($breadcrumb));
echo "\n";
}