From: Chuck Hagenbuch Date: Sat, 24 Jul 2010 19:56:57 +0000 (-0400) Subject: Show the function call trace rather than just the line of the eventual error. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=be5df5808208736e9d6e038d86b4f0a846dcb863;p=horde.git Show the function call trace rather than just the line of the eventual error. --- diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 075f05bb7..2e0953c1f 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -124,7 +124,13 @@ class Horde } if ($admin) { - $errortext .= '

' . sprintf(_("[line %d of %s]"), $line, $file) . '

'; + if ($error instanceof Exception) { + $trace = $error; + } else { + $trace = debug_backtrace(); + } + $backtrace = new Horde_Support_Backtrace($trace); + $errortext .= '
' . $backtrace->getMap() . '
'; if (is_object($error)) { $errortext .= '

' . _("Details:") . '

'; $errortext .= '

' . _("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.") . '

';