API15:JException/getTraceAsString
From Joomla! Documentation
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
Code Examples