Back to ErrorDocument class

Method renderBacktrace

public string
renderBacktrace
()
Render the backtrace
Returns
  • string The contents of the backtrace
Since
  • 1.7.0
Class: ErrorDocument
Project: Joomla

Method renderBacktrace - Source code

/**
 * Render the backtrace
 *
 * @return  string  The contents of the backtrace
 *
 * @since   1.7.0
 */
public function renderBacktrace()
{
    // If no error object is set return null
    if (!isset($this->_error)) {
        return;
    }
    // The back trace
    $backtrace = $this->_error->getTrace();
    // Add the position of the actual file
    array_unshift($backtrace, array('file' => $this->_error->getFile(), 'line' => $this->_error->getLine(), 'function' => ''));
    return LayoutHelper::render('joomla.error.backtrace', array('backtrace' => $backtrace));
}