Print errors.

@return void
339817
protected function printErrors(): void
    {
        $this->output->writeln('');
        $this->output->writeln('');

        foreach ($this->errors as $error) {
            $this->output->write('<fg=red>ERROR   </> ' . $error['file'] . ':' . $error['line'] . ' - ');

            if ($error['type'] == 'class') {
                $this->output->write('Class <info>' . $error['class'] . '</info> is missing a docblock.');
            }

            if ($error['type'] == 'method') {
                $this->output->write('Method <info>' . $error['method'] . '</info> is missing a docblock.');
            }

            $this->output->writeln('');
        }
    }
982849
def print_error(input, err, scanner):
    """"""
    p = err.pos
    # Figure out the line number
    line = input[:p].count('\n')
    print err.msg + " on line " + repr(line + 1) + ":"
    # Now try printing part of the line
    text = input[max(p - 80, 0):
        p + 80]
    p = p - max(p - 80, 0)

    # Strip to the left
    i = text[:p].rfind('\n')
    j = text[:p].rfind('\r')
    if i < 0 or (0 <= j < i):
        i = j
    if 0 <= i < p:
        p = p - i - 1
        text = text[i + 1:]

    # Strip to the right
    i = text.find('\n', p)
    j = text.find('\r', p)
    if i < 0 or (0 <= j < i):
        i = j
    if i >= 0:
        text = text[:i]

    # Now shorten the text
    while len(text) > 70 and p > 60:
        # Cut off 10 chars
        text = "..." + text[10:]
        p = p - 7

    # Now print the string, along with an indicator
    print '> ', text
    print '> ', ' ' * p + '^'
    print 'List of nearby tokens:', scanner
944480
function printErrors(summary, errors) {
  console.log(chalk.red(summary));
  console.log();
  errors.forEach(err => {
    console.log(err.message || err);
    console.log();
  });
}
150043
protected function _error()
    {
        $subject = $this->_subject(['success' => false]);

        $this->_trigger('afterVerify', $subject);
        $this->setFlash('error', $subject);
        $this->_trigger('beforeRender', $subject);
    }
969986
public function printDebug()
    {
        if(($this->xResponse))
        {
            foreach($this->aDebugMessages as $sMessage)
            {
                $this->xResponse->debug($sMessage);
            }
            $this->aDebugMessages = [];
        }
    }
728705
public function outputGroupedErrors()
    {
        if (empty($this->errors)) {
            return '';
        }
        if (!empty($this->options['errors_prefix'])) {
            $errorHtml = str_replace(array('<qf:message>', '</qf:message>', '{message}'),
                                     array('', '', $this->options['errors_prefix']),
                                     $this->templatesForClass['special:error']['prefix']);
        } else {
            $errorHtml = preg_replace('!<qf:message>.*</qf:message>!isU', '',
                                      $this->templatesForClass['special:error']['prefix']);
        }
        $errorHtml .= implode($this->templatesForClass['special:error']['separator'], $this->errors);
        if (!empty($this->options['errors_suffix'])) {
            $errorHtml .= str_replace(array('<qf:message>', '</qf:message>', '{message}'),
                                      array('', '', $this->options['errors_suffix']),
                                      $this->templatesForClass['special:error']['suffix']);
        } else {
            $errorHtml .= preg_replace('!<qf:message>.*</qf:message>!isU', '',
                                      $this->templatesForClass['special:error']['suffix']);
        }
        return $errorHtml;
    }
1185265
def print_errors(self, file_name):
        
        for error in self.get_messages(file_name):
            print('\t', error.__unicode__())
394651
private function check_errors() {
 	 	switch($this->db['phptype']) {
 	 		case "sqlite":
				if ($this->sqlite_version == 3) {
					$this->errno = $this->conn->lastErrorCode();
					$this->error = $this->conn->lastErrorMsg();
				} else {
					$this->errno = sqlite_last_error($this->conn);
					$this->error = sqlite_error_string($this->errno);
				}
 	 			break;
 	 		case "mysql":
 	 			$this->errno = mysql_errno($this->conn);
 	 			$this->error = mysql_error($this->conn);
 	 			break;
 	 		case "mysqli":
				if (mysqli_connect_error()) {
					die('Connect Error: ' . mysqli_connect_error());
				}
 	 			$this->errno = mysqli_errno($this->conn);
 	 			$this->error = mysqli_error($this->conn);
 	 			break;
 	 	}

 	}
1364066
private void printErrors(final List<Span> falsePositives,
      final List<Span> falseNegatives, final String[] toks) {
    this.printStream.println("False positives: {");
    this.printStream.println(print(falsePositives, toks));
    this.printStream.println("} False negatives: {");
    this.printStream.println(print(falseNegatives, toks));
    this.printStream.println("}\n");
  }
225843
public static function errTime($s)
    {
        self::printMessage('<' . Carbon::now()->toTimeString() . '> ' . self::withCallsite($s), 'error');
    }
1078409
protected function errorsHandle()
    {
        $debug = $this->config('debug');

        error_reporting(($debug) ? E_ALL : E_ERROR & ~E_NOTICE);

        set_error_handler(function ($type, $message, $file, $line) {
            throw new \ErrorException($message, 0, $type, $file, $line);
        });

        set_exception_handler(function (\Exception $e) {

            $exception = new ExceptionsMiddleware;

            $log = $this->getLog(); // Force Slim to append log to env if not already
            $env = $this->environment();
            $env['slim.log'] = $log;
            $env['slim.log']->error($e);

            $this->contentType('text/html');
            $this->response()->status(500);

            echo $this->response()->body($exception->renderBody($env, $e));
        });

        register_shutdown_function(function () {

            if ( !is_null($options = error_get_last()) )
            {
                $title = 'Slimore Application Error Shutdown';

                $html  = html($title, [
                    '<meta http-equiv="X-UA-Compatible" content="IE=edge" />',
                    '<meta name="renderer" content="webkit" />',
                    '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />',
                    style([
                        '*{margin:0;padding:0;}',
                        'html {font-size: 62.5%;}',
                        'html, body {max-width: 100%;width: 100%;}',
                        'body {font-size: 1.4rem;font-family: "Microsoft Yahei", Helvetica, Tahoma, STXihei, arial,verdana,sans-serif;background:#fff;color:#555;}',
                        'img {border: none;}',
                        'pre, pre code {font-family:Consolas, arial,verdana,sans-serif;}',
                        '#layout {padding: 6rem;}',
                        '#main {margin: 0 auto;line-height: 1.5;}',
                        '#main > h1 {font-size: 10rem;margin-bottom: 1rem;}',
                        '#main > h3 {margin-bottom: 2rem; font-size: 1.8rem;}',
                        '#main > h4 {margin-bottom: 1rem; font-size: 1.8rem;}',
                        '#main pre {margin: 1.5rem 0;white-space: pre-wrap;word-wrap: break-word;}',
                        '#main > p {white-space: pre-wrap;word-wrap: break-word;line-height: 1.3;margin-bottom: 0.6rem;}',
                        '#main > p > strong {width: 7rem;display:inline-block;}',
                        '.logo {text-align: left;border-top:1px solid #eee;margin-top: 5rem;padding: 3rem 0 0;color: #ccc;}',
                        '.logo > h1 {font-weight: normal;font-size: 5rem;}',
                        '.logo img {margin-left: -2rem;}',
                        '.trace-line {padding: 0.3rem 0.6rem;margin-left:-0.6rem;-webkit-transition: background-color 300ms ease-out;transition: background-color 300ms ease-out;}',
                        '.trace-line:hover {background:#fffccc;}'
                    ])
                ], [
                    '<div id="layout">',
                    '<div id="main">',
                    '<h1>:(</h1>',
                    '<h3>' . $title . '</h3>',
                    '<h4>Details ：</h4>',
                    '<p><strong>Type: </strong> ' . $options['type'] . '</p>',
                    '<p><strong>Message: </strong> ' . $options['message'] . '</p>',
                    '<p><strong>File: </strong> ' . $options['file'] . '</p>',
                    '<p><strong>Line: </strong> ' . $options['line'] . '</p>',
                    '<div class="logo">',
                    '<h1>Slimore</h1>',
                    '<p>The fully (H)MVC framework, based on the Slim PHP Framwork.</p>',
                    '</div>',
                    '</div>',
                    '</div>'
                ]);

                echo $html;

                exit;
            }

        });
    }
404529
def print_err(*args, **kwargs):
    
    sys.stderr.write(" ".join(str(arg) for arg in args) + "\n")
    if kwargs.get("flush", False):
        sys.stderr.flush()
481155
public function displayExceptionError()
    {
        $aViewData = $this->getViewData();

        //add all exceptions to display
        $aErrors = $this->_getErrors();

        if (is_array($aErrors) && count($aErrors)) {
            \OxidEsales\Eshop\Core\Registry::getUtilsView()->passAllErrorsToView($aViewData, $aErrors);
        }

        $oSmarty = \OxidEsales\Eshop\Core\Registry::getUtilsView()->getSmarty();
        $oSmarty->assign("Errors", $aViewData["Errors"]);

        // resetting errors from session
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('Errors', []);
    }
101419
public function error() {
        $error = $this->request->url(2);
        $error_layout = Config::get('Error.layout');
        $this->view->setLayout($error_layout ? $error_layout : 'error');
        
        if ( in_array($error, [500, 404]) ) {
            $this->response->defaultHeader($error);
            $this->view->setTemplate( is_file(PO_PATH_TEMPLATES . DS . 'error' . DS . 'error-' . $error . '.phtml') ? 
                    'error-' . $error : 'default', 'error');
        } else {
            $this->view->setTemplate('default', 'error');
        }
    }
1071537
private function printReportsOfFilesWithProblems()
    {
        $this->output->writeln(PHP_EOL . '<error>errors:</error>');

        foreach ($this->reports as $report) {
            if (false === $report->hasProblems()) {
                continue;
            }

            $file = $report->getFile();
            $this->output->writeln('file: ' . $file->getPath() . DIRECTORY_SEPARATOR . $file->getFilename());

            foreach ($report->getProblems() as $problem) {
                $this->output->write(
                    '  > ' . $problem->getMessage() . PHP_EOL
                );
            }

            $this->output->write(' - - ' . PHP_EOL);
        }
    }
469579
private void printErrors(final List<String> filteredDoc,
      final List<String> filteredRefs, final List<String> filteredPreds) {
    this.printStream.println("Errors: {");
    this.printStream.println("Tok: Ref | Pred");
    this.printStream.println("---------------");
    for (int i = 0; i < filteredDoc.size(); i++) {
      this.printStream.println(filteredDoc.get(i) + ": " + filteredRefs.get(i)
          + " | " + filteredPreds.get(i));
    }
    this.printStream.println("}\n");
  }
695788
public function renderError()
	{
		$parent=$this->getParent();
		return $parent->getActiveFormWidget()->error($parent->getModel(), $this->name, $this->errorOptions, $this->enableAjaxValidation, $this->enableClientValidation);
	}