concrete/src/Console/Command.php
protected function writeError(OutputInterface $output, $error)
    {
        $result = [trim($error->getMessage())];

        // If the output is verbose, add file and location
        if ($output->isVerbose()) {
            $file = $error->getFile();
            if ($file) {
                $result[] = "File: {$file}" . ($error->getLine() ? ':' . $error->getLine() : '');
            }
        }

        // If the output is very verbose, add stacktrace
        if ($output->isVeryVerbose()) {
            $trace = $error->getTraceAsString();
            $result[] = 'Trace:';
            $result[] = $trace;
        }

        $this->output->error($result);
    }
protected function writeError(OutputInterface $output, $error)
    {
        $result = [trim($error->getMessage())];

        // If the output is verbose, add file and location
        if ($output->isVerbose()) {
            $file = $error->getFile();
            if ($file) {
                $result[] = "File: {$file}" . ($error->getLine() ? ':' . $error->getLine() : '');
            }
        }

        // If the output is very verbose, add stacktrace
        if ($output->isVeryVerbose()) {
            $trace = $error->getTraceAsString();
            $result[] = 'Trace:';
            $result[] = $trace;
        }

        $this->output->error($result);
    }
protected function writeError ( OutputInterface $ output , $ error ) { $ result = [ trim ( $ error -> getMessage ( ) ) ] ; // If the output is verbose, add file and location if ( $ output -> isVerbose ( ) ) { $ file = $ error -> getFile ( ) ; if ( $ file ) { $ result [ ] = "File: {$file}" . ( $ error -> getLine ( ) ? ':' . $ error -> getLine ( ) : '' ) ; } } // If the output is very verbose, add stacktrace if ( $ output -> isVeryVerbose ( ) ) { $ trace = $ error -> getTraceAsString ( ) ; $ result [ ] = 'Trace:' ; $ result [ ] = $ trace ; } $ this -> output -> error ( $ result ) ; }
Write an exception.

@param OutputInterface $output
@param Exception|Throwable $error
@deprecated Use $this->output to manage your output
@see OutputStyle::error()
Write an exception .