}
if ($admin) {
- $errortext .= '<p><code>' . sprintf(_("[line %d of %s]"), $line, $file) . '</code></p>';
+ if ($error instanceof Exception) {
+ $trace = $error;
+ } else {
+ $trace = debug_backtrace();
+ }
+ $backtrace = new Horde_Support_Backtrace($trace);
+ $errortext .= '<div id="backtrace"><pre>' . $backtrace->getMap() . '</pre></div>';
if (is_object($error)) {
$errortext .= '<h3>' . _("Details:") . '</h3>';
$errortext .= '<h4>' . _("The full error message is logged in Horde's log file, and is shown below only to administrators. Non-administrative users will not see error details.") . '</h4>';