From: Evan Prodromou Date: Thu, 25 Jun 2009 18:08:55 +0000 (-0700) Subject: show backtrace on error X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=09010c4c2b80bb94607e2946fa94bca5ff160fed;p=quix0rs-gnu-social.git show backtrace on error --- diff --git a/index.php b/index.php index cb26e21961..cb6a0fe603 100644 --- a/index.php +++ b/index.php @@ -48,7 +48,14 @@ function handleError($error) $logmsg .= " : ". $error->getDebugInfo(); } common_log(LOG_ERR, $logmsg); - if ($error instanceof DB_DataObject_Error) { + if(common_config('site', 'logdebug')) { + $bt = $error->getBacktrace(); + foreach ($bt as $line) { + common_log(LOG_ERR, $line); + } + } + if ($error instanceof DB_DataObject_Error || + $error instanceof DB_Error) { $msg = sprintf(_('The database for %s isn\'t responding correctly, '. 'so the site won\'t work properly. '. 'The site admins probably know about the problem, '.