本文整理汇总了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";
}