diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-25 11:08:55 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-25 11:08:55 -0700 |
commit | 09010c4c2b80bb94607e2946fa94bca5ff160fed (patch) | |
tree | bad7278b096c4a3abec01ff74daf444f5436c1ba /index.php | |
parent | 4d56bc6a0adba63c5546d5d18a70fa2c989839be (diff) |
show backtrace on error
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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, '. |