Ejemplo n.º 1
0
 function paintException($message)
 {
     parent::paintException($message);
     echo PHP_EOL;
     echo "       Exception ", $this->getExceptionCount(), "!", PHP_EOL;
     echo "       {$message->getMessage()}";
 }
 /**
  *  例外
  *
  *  @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);
 }
Ejemplo n.º 3
0
 function paintException($message)
 {
     parent::paintException($message);
     print $this->_getIndent(1);
     print "<" . $this->_namespace . "exception>";
     print $this->toParsedXml($message);
     print "</" . $this->_namespace . "exception>\n";
 }
 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");
 }
 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);
 }
 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);
 }
Ejemplo n.º 7
0
 /**
  *    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";
 }
Ejemplo n.º 8
0
 /**
  * Paint exception faildetail to STDERR.
  */
 function paintException($message)
 {
     parent::paintException($message);
     fwrite(STDERR, 'EXCEPTION' . $this->faildetail_separator . $this->_paintTestFailDetail($message));
 }
Ejemplo n.º 9
0
 /**
  *    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";
 }
Ejemplo n.º 10
0
	    function paintException($message) 
	    {
            parent::paintException($message);
            $breadcrumb = $this->getTestList();
			array_shift($breadcrumb);
			$bc = implode(">", $breadcrumb);

			$this->PrintMessage("Exception: {$bc} -> {$message}", true, 'yellow');
        }
Ejemplo n.º 11
0
 /**
  *    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\t" . $this->getExceptionCount() . ") " . $exception->getMessage() . "\n" . "\tin " . substr($exception->getTraceAsString(), 0, strpos($exception->getTraceAsString(), "\n")) . "\n");
 }
Ejemplo n.º 12
0
 function paintException($exception)
 {
     parent::paintException($exception);
     error_log("Exception: " . $exception);
     $this->terminateAbnormally($exception);
 }
 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);
 }
Ejemplo n.º 14
0
 /**
  *    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();
 }
Ejemplo n.º 15
0
 /**
  * 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";
 }
Ejemplo n.º 16
0
 /**
  *    Paints a PHP error or exception.
  *    @param string $message        Message is ignored.
  *    @access public
  *    @abstract
  */
 function paintException($message)
 {
     parent::paintException($message);
     print "<br>Exception " . $this->getExceptionCount() . "!\n<br>{$message}\n<br>";
 }
Ejemplo n.º 17
0
 function paintException($exception)
 {
     SimpleReporter::paintException($exception);
     $message = 'Unexpected exception of type [' . s(get_class($exception)) . '] with message [' . s($exception->getMessage()) . '] in [' . s($exception->getFile()) . ' line ' . s($exception->getLine()) . ']';
     if (is_a($exception, 'moodle_exception')) {
         $message .= '<br/><br/>Error string: <tt>' . s($exception->errorcode) . '</tt> from <tt>' . s($exception->module) . '</tt>';
         if ($exception->a !== null) {
             $message .= '(<tt>' . s($exception->a) . '</tt>)';
         }
         $message .= ' &ndash; <i>' . get_string($exception->errorcode, $exception->module, $exception->a) . '</i>';
         if ($exception->link) {
             $message .= '<br/>Link: <tt>' . s($exception->link) . '</tt>';
         }
         if ($exception->debuginfo) {
             // Note debug info is not escaped so may contain formatting
             $message .= '<pre>' . $exception->debuginfo . "\n\n";
         } else {
             $message .= '<pre>';
         }
         $message .= $exception->getTraceAsString() . '</pre>';
     }
     $this->_paintPassFail('exception', $message, true);
 }
Ejemplo n.º 18
0
 /**
  * Paints a PHP exception.
  * @param Exception $exception Exception to display.
  * @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 = Set::filter($this->getTestList());
     array_shift($breadcrumb);
     echo "<div>" . implode(" -&gt; ", $breadcrumb) . "</div>\n";
     echo "</li>\n";
 }
Ejemplo n.º 19
0
 /**
  *    Paints exception as XML.
  *    @param Exception $exception    Exception to encode.
  *    @access public
  */
 function paintException($exception)
 {
     parent::paintException($exception);
     print $this->getIndent(1);
     print "<" . $this->namespace . "exception>";
     $message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
     print $this->toParsedXml($message);
     print "</" . $this->namespace . "exception>\n";
 }
Ejemplo n.º 20
0
 /**
  *    Paints a PHP error or exception.
  *    @param Exception $exception      Exception to describe.
  *    @access public
  *    @abstract
  */
 function paintException($exception)
 {
     parent::paintException($exception);
     $message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
     print "Exception " . $this->getExceptionCount() . "!\n{$message}\n";
 }
 /**
  * @param Exception $e
  */
 public function paintException(Exception $e)
 {
     parent::paintException($e);
     $this->paintFailureOrError(get_class($e) . ': ' . $e->getMessage(), 'error');
 }
Ejemplo n.º 22
0
 /**
  * Paints a PHP error or exception.
  *
  * @param string $message        Message is ignored.
  *
  * @abstract
  */
 public 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";
 }
Ejemplo n.º 23
0
 /**
  * @param \Exception $e
  */
 public function paintException(\Exception $e)
 {
     parent::paintException($e);
     $this->writeError(get_class($e) . ': ' . $e->getMessage() . PHP_EOL . PHP_EOL . $e->getFile() . ':' . $e->getLine() . PHP_EOL . FailureTrace::buildFailureTrace($e->getTrace()), null, $e->getFile(), $e->getLine(), $e->getMessage());
 }
Ejemplo n.º 24
0
 /**
  * Paint exception faildetail to STDERR.
  */
 function paintException($message)
 {
     parent::paintException($message);
     echo 'EXCEPTION' . $this->faildetail_separator . $this->_paintTestFailDetail($message);
 }
Ejemplo n.º 25
0
 /**
  * Paints a PHP error or exception.
  *
  * @param Exception $exception      Exception to describe.
  *
  * @abstract
  */
 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() . ']';
     print 'Exception ' . $this->getExceptionCount() . "!\n{$message}\n";
     $breadcrumb = $this->getTestList();
     array_shift($breadcrumb);
     print "\tin " . implode("\n\tin ", array_reverse($breadcrumb));
     print "\n";
 }
Ejemplo n.º 26
0
 function paintException($exception)
 {
     parent::paintException($exception);
     $this->_addToOutput('FORMATED', $exception);
 }
Ejemplo n.º 27
0
 /**
  *    Paints a PHP error or exception.
  *    @param string $message        Message is ignored.
  *    @access public
  *    @abstract
  */
 function paintException($message) {
     parent::paintException($message);
     print "Exception " . $this->getExceptionCount() . "!\n$message\n";
 }
Ejemplo n.º 28
0
 function paintException($exception)
 {
     parent::paintException($exception);
     $this->addError(self::E_TYPE_EXCEPTION, $this->getTestList(), $exception->getMessage(), $exception);
 }