API15:JException/getTraceAsString
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Method to get the formatted backtrace information
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
getTraceAsString()
Returns
string Formated string of trace
Defined in
libraries/joomla/error/exception.php
Importing
jimport( 'joomla.error.exception' );
Source Body
function getTraceAsString( ) { //Get the trace array $trace = JException::getTrace(); $result = ''; foreach ($trace as $back) { if (isset($back['file']) && strpos($back['file'], 'error.php') === false) { $result .= '<br />'.$back['file'].':'.$back['line']; } } return $result; }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
