src/Failure/RedisBackend.php
protected function getBacktrace(\Exception $exception)
    {
        $backtrace = array();

        $backtrace[] = '---';
        $backtrace[] = $this->getErrorMessage($exception);
        $backtrace[] = '---';

        // Allow marshalling of the trace: PHP marks getTraceAsString as final :-(
        if (method_exists($exception, 'getPreviousTraceAsString')) {
            $backtrace = array_merge($backtrace, explode("\n", $exception->getPreviousTraceAsString()));
        } else {
            $backtrace = array_merge($backtrace, explode("\n", $exception->getTraceAsString()));
        }

        if (($previous = $exception->getPrevious())) {
            $backtrace = array_merge($backtrace, $this->getBacktrace($previous)); // Recurse
        }

        return $backtrace;
    }
protected function getBacktrace(\Exception $exception)
    {
        $backtrace = array();

        $backtrace[] = '---';
        $backtrace[] = $this->getErrorMessage($exception);
        $backtrace[] = '---';

        // Allow marshalling of the trace: PHP marks getTraceAsString as final :-(
        if (method_exists($exception, 'getPreviousTraceAsString')) {
            $backtrace = array_merge($backtrace, explode("\n", $exception->getPreviousTraceAsString()));
        } else {
            $backtrace = array_merge($backtrace, explode("\n", $exception->getTraceAsString()));
        }

        if (($previous = $exception->getPrevious())) {
            $backtrace = array_merge($backtrace, $this->getBacktrace($previous)); // Recurse
        }

        return $backtrace;
    }
protected function getBacktrace ( \ Exception $ exception ) { $ backtrace = array ( ) ; $ backtrace [ ] = '---' ; $ backtrace [ ] = $ this -> getErrorMessage ( $ exception ) ; $ backtrace [ ] = '---' ; // Allow marshalling of the trace: PHP marks getTraceAsString as final :-( if ( method_exists ( $ exception , 'getPreviousTraceAsString' ) ) { $ backtrace = array_merge ( $ backtrace , explode ( "\n" , $ exception -> getPreviousTraceAsString ( ) ) ) ; } else { $ backtrace = array_merge ( $ backtrace , explode ( "\n" , $ exception -> getTraceAsString ( ) ) ) ; } if ( ( $ previous = $ exception -> getPrevious ( ) ) ) { $ backtrace = array_merge ( $ backtrace , $ this -> getBacktrace ( $ previous ) ) ; // Recurse } return $ backtrace ; }
Gets the backtrace for the exception

The backtrace area is the only part of the failure that's shown on
multiple lines by resque-web. So, we'll also use it to mention the
wrapping exceptions.

@param \Exception $exception
@return array
Gets the backtrace for the exception