當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SimpleReporter::paintException方法代碼示例

本文整理匯總了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()}";
 }
開發者ID:hiroki-ta,項目名稱:my.project,代碼行數:7,代碼來源:TextDetailReporter.php

示例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);
 }
開發者ID:hiroki-namekawa,項目名稱:test-upr,代碼行數:14,代碼來源:Ethna_UnitTestReporter.php

示例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";
 }
開發者ID:BackupTheBerlios,項目名稱:phpbase-svn,代碼行數:8,代碼來源:xml.php

示例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");
 }
開發者ID:CREASIG,項目名稱:lizmap-web-client,代碼行數:9,代碼來源:jtextrespreporter.class.php

示例5: paintException

 function paintException($exception)
 {
     parent::paintException($exception);
     $str = "<span class=\"exception\">Exception</span>: ";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     $str .= implode(" -&gt; ", $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);
 }
開發者ID:jelix,項目名稱:simpletest-module,代碼行數:10,代碼來源:jhtmlrespreporter.class.php

示例6: paintException

 function paintException($message)
 {
     parent::paintException($message);
     $str = "<span class=\"exception\">Exception</span>: ";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     $str .= implode(" -&gt; ", $breadcrumb);
     $str .= " -&gt; <strong>" . $this->_htmlEntities($message) . "</strong><br />\n";
     $this->_response->body->append('MAIN', $str);
 }
開發者ID:alienpham,項目名稱:helenekling,代碼行數:10,代碼來源:jhtmlrespreporter.class.php

示例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("-&gt;", $breadcrumb);
     $msg .= "-&gt;<strong>" . htmlentities($message) . "</strong><br />";
     echo "add_fail('{$msg}');\n";
 }
開發者ID:JackCanada,項目名稱:moodle-hacks,代碼行數:16,代碼來源:webunit_reporter.php

示例8: paintException

 /**
  * Paint exception faildetail to STDERR.
  */
 function paintException($message)
 {
     parent::paintException($message);
     fwrite(STDERR, 'EXCEPTION' . $this->faildetail_separator . $this->_paintTestFailDetail($message));
 }
開發者ID:pyfun,項目名稱:dokuwiki,代碼行數:8,代碼來源:cli_reporter.php

示例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";
 }
開發者ID:kitware,項目名稱:cdash,代碼行數:13,代碼來源:xml.php

示例10: paintException

	    function paintException($message) 
	    {
            parent::paintException($message);
            $breadcrumb = $this->getTestList();
			array_shift($breadcrumb);
			$bc = implode(">", $breadcrumb);

			$this->PrintMessage("Exception: {$bc} -> {$message}", true, 'yellow');
        }
開發者ID:rchicoria,項目名稱:epp-drs,代碼行數:9,代碼來源:class.ShellReporter.php

示例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");
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:13,代碼來源:TestsPluginReporter.class.php

示例12: paintException

 function paintException($exception)
 {
     parent::paintException($exception);
     error_log("Exception: " . $exception);
     $this->terminateAbnormally($exception);
 }
開發者ID:bermi,項目名稱:akelos,代碼行數:6,代碼來源:junit_xml_reporter.php

示例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);
 }
開發者ID:lubosdz,項目名稱:simpletest-visual-gui,代碼行數:7,代碼來源:SimpleHtmlReporter.php

示例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(" -&gt; ", $breadcrumb);
     $message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
     print " -&gt; <strong>" . $this->_htmlEntities($message) . "</strong><br />\n";
     flush();
 }
開發者ID:ivantcholakov,項目名稱:Bonfire,代碼行數:16,代碼來源:my_reporter.php

示例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";
 }
開發者ID:CloCkWeRX,項目名稱:kort,代碼行數:12,代碼來源:KortCliReporter.php


注:本文中的SimpleReporter::paintException方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。