本文整理汇总了PHP中SimpleReporter::paintException方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleReporter::paintException方法的具体用法?PHP SimpleReporter::paintException怎么用?PHP SimpleReporter::paintException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleReporter
的用法示例。
在下文中一共展示了SimpleReporter::paintException方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paintException
function paintException($message)
{
parent::paintException($message);
echo PHP_EOL;
echo " Exception ", $this->getExceptionCount(), "!", PHP_EOL;
echo " {$message->getMessage()}";
}
示例2: paintException
/**
* 例外
*
* @access public
* @param string $message メッセージ
*/
function paintException($message)
{
parent::paintException($message);
$breadcrumb = $this->getTestList();
$test = $breadcrumb[2];
array_shift($breadcrumb);
$this->report[] = array('type' => 'Exception', 'test' => $test, 'breadcrumb' => $breadcrumb, 'message' => $message);
}
示例3: paintException
function paintException($message)
{
parent::paintException($message);
print $this->_getIndent(1);
print "<" . $this->_namespace . "exception>";
print $this->toParsedXml($message);
print "</" . $this->_namespace . "exception>\n";
}
示例4: paintException
function paintException($message)
{
parent::paintException($message);
$this->_response->addContent("Exception !!\n");
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$this->_response->addContent("\tin " . implode("\n\tin ", array_reverse($breadcrumb)));
$this->_response->addContent("\n\t " . $message . "\n");
}
示例5: paintException
function paintException($exception)
{
parent::paintException($exception);
$str = "<span class=\"exception\">Exception</span>: ";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$str .= implode(" -> ", $breadcrumb);
$str .= 'Unexpected exception of type [' . get_class($exception) . '] with message [<strong>"' . $this->_htmlEntities($exception->getMessage()) . '</strong>] in [' . $this->_htmlEntities($exception->getFile()) . ' line ' . $exception->getLine() . "]<br />\n";
$this->_response->body->append('MAIN', $str);
}
示例6: paintException
function paintException($message)
{
parent::paintException($message);
$str = "<span class=\"exception\">Exception</span>: ";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$str .= implode(" -> ", $breadcrumb);
$str .= " -> <strong>" . $this->_htmlEntities($message) . "</strong><br />\n";
$this->_response->body->append('MAIN', $str);
}
示例7: paintException
/**
* Paints a PHP error or exception.
* @param string $message Message is ignored.
* @access public
* @abstract
*/
function paintException($message)
{
parent::paintException($message);
$msg = "<span class=\"fail\">Exception</span>: ";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$msg .= implode("->", $breadcrumb);
$msg .= "-><strong>" . htmlentities($message) . "</strong><br />";
echo "add_fail('{$msg}');\n";
}
示例8: paintException
/**
* Paint exception faildetail to STDERR.
*/
function paintException($message)
{
parent::paintException($message);
fwrite(STDERR, 'EXCEPTION' . $this->faildetail_separator . $this->_paintTestFailDetail($message));
}
示例9: paintException
/**
* Paints exception as XML.
* @param Exception $exception Exception to encode.
*/
public function paintException($exception)
{
parent::paintException($exception);
echo $this->getIndent(1);
echo '<' . $this->namespace . 'exception>';
$message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
echo $this->toParsedXml($message);
echo '</' . $this->namespace . "exception>\n";
}
示例10: paintException
function paintException($message)
{
parent::paintException($message);
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$bc = implode(">", $breadcrumb);
$this->PrintMessage("Exception: {$bc} -> {$message}", true, 'yellow');
}
示例11: paintException
/**
* Paints a PHP error or exception.
* @param string $message Message to be shown.
* @access public
* @abstract
*/
function paintException($exception)
{
parent::paintException($exception);
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
error_log("Exception: \n[1;31m\t" . $this->getExceptionCount() . ") " . $exception->getMessage() . "[0m\n" . "\tin " . substr($exception->getTraceAsString(), 0, strpos($exception->getTraceAsString(), "\n")) . "\n");
}
示例12: paintException
function paintException($exception)
{
parent::paintException($exception);
error_log("Exception: " . $exception);
$this->terminateAbnormally($exception);
}
示例13: paintException
public function paintException($exception)
{
parent::paintException($exception);
$message = sprintf('Unexpected exception of type [%s] with message [%s] in [%s:%s]', get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine());
$this->method_status['exceptions'][] = $message;
printf("<div>" . '<strong>Exception</strong>: %s</div>', $message);
}
示例14: paintException
/**
* Paints a PHP exception.
* @param Exception $exception Exception to display.
* @access public
*/
function paintException($exception)
{
parent::paintException($exception);
print "<span class=\"fail\">Exception</span>: ";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
print implode(" -> ", $breadcrumb);
$message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
print " -> <strong>" . $this->_htmlEntities($message) . "</strong><br />\n";
flush();
}
示例15: paintException
/**
* Paints a test exception.
*
* @param string $exception The message of the test exception.
*
* @return void
*/
public function paintException($exception)
{
parent::paintException($exception);
print "\n\nEXCEPTION: " . $exception . "\n\n";
}