private function outputTrace(\Throwable $exception, OutputInterface $output)
    {
        $output->writeln('<comment>Exception trace:</comment>');
        $backtraceSteps = $this->getTrace($exception);
        foreach ($backtraceSteps as $index => $step) {
            $traceLine = '#' . $index . ' ';
            if (isset($backtraceSteps[$index]['class'])) {
                $traceLine .= $backtraceSteps[$index]['class'];
            }
            if (isset($backtraceSteps[$index]['function'])) {
                $traceLine .= (isset($backtraceSteps[$index]['class']) ? $backtraceSteps[$index]['type'] : '') . $backtraceSteps[$index]['function'] . '()';
            }
            $output->writeln(sprintf('<info>%s</info>', $traceLine));
            if (isset($backtraceSteps[$index]['file'])) {
                $output->writeln('   ' . $this->getPossibleShortenedFileName($backtraceSteps[$index]['file']) . (isset($backtraceSteps[$index]['line']) ? ':' . $backtraceSteps[$index]['line'] : ''));
            }
        }
    }
private function outputTrace(\Throwable $exception, OutputInterface $output)
    {
        $output->writeln('<comment>Exception trace:</comment>');
        $backtraceSteps = $this->getTrace($exception);
        foreach ($backtraceSteps as $index => $step) {
            $traceLine = '#' . $index . ' ';
            if (isset($backtraceSteps[$index]['class'])) {
                $traceLine .= $backtraceSteps[$index]['class'];
            }
            if (isset($backtraceSteps[$index]['function'])) {
                $traceLine .= (isset($backtraceSteps[$index]['class']) ? $backtraceSteps[$index]['type'] : '') . $backtraceSteps[$index]['function'] . '()';
            }
            $output->writeln(sprintf('<info>%s</info>', $traceLine));
            if (isset($backtraceSteps[$index]['file'])) {
                $output->writeln('   ' . $this->getPossibleShortenedFileName($backtraceSteps[$index]['file']) . (isset($backtraceSteps[$index]['line']) ? ':' . $backtraceSteps[$index]['line'] : ''));
            }
        }
    }
private function outputTrace ( \ Throwable $ exception , OutputInterface $ output ) { $ output -> writeln ( '<comment>Exception trace:</comment>' ) ; $ backtraceSteps = $ this -> getTrace ( $ exception ) ; foreach ( $ backtraceSteps as $ index => $ step ) { $ traceLine = '#' . $ index . ' ' ; if ( isset ( $ backtraceSteps [ $ index ] [ 'class' ] ) ) { $ traceLine .= $ backtraceSteps [ $ index ] [ 'class' ] ; } if ( isset ( $ backtraceSteps [ $ index ] [ 'function' ] ) ) { $ traceLine .= ( isset ( $ backtraceSteps [ $ index ] [ 'class' ] ) ? $ backtraceSteps [ $ index ] [ 'type' ] : '' ) . $ backtraceSteps [ $ index ] [ 'function' ] . '()' ; } $ output -> writeln ( sprintf ( '<info>%s</info>' , $ traceLine ) ) ; if ( isset ( $ backtraceSteps [ $ index ] [ 'file' ] ) ) { $ output -> writeln ( '   ' . $ this -> getPossibleShortenedFileName ( $ backtraceSteps [ $ index ] [ 'file' ] ) . ( isset ( $ backtraceSteps [ $ index ] [ 'line' ] ) ? ':' . $ backtraceSteps [ $ index ] [ 'line' ] : '' ) ) ; } } }
Output formatted trace.

@param \Throwable $exception
Output formatted trace .