Commit cb7907ae authored by Penny Leach's avatar Penny Leach
Browse files
parents 4999f923 68c03b72
......@@ -78,8 +78,4 @@ $cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
// but probably only warnings are useful on a live site.
$cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON;
// Makes debug backtraces go to the screen if the default exception
// handler is called.
$cfg->debug_mode = true;
?>
......@@ -53,7 +53,7 @@ function execute_sql($command) {
$result = $db->Execute($command);
}
catch (ADODB_Exception $e) {
log_warn($e->getMessage() . "Command was: $command");
log_dbg($e->getMessage() . "Command was: $command");
$db->debug = $olddebug;
throw new DatalibException('Could not execute command: ' . $command);
}
......@@ -357,7 +357,7 @@ function get_recordset_sql($sql, $values=null, $limitfrom=null, $limitnum=null)
}
catch (ADODB_Exception $e) {
$message = 'Failed to get a recordset: ' . $e->getMessage() . "Command was: $sql";
log_warn($message);
log_dbg($message);
throw new DatalibException($message);
}
......
......@@ -282,8 +282,7 @@ function exception ($e) {
</head>
<body>
EOF;
if (function_exists('get_config') && get_config('debug_mode')
&& function_exists('insert_messages')) {
if (function_exists('insert_messages')) {
echo insert_messages();
}
echo <<<EOF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment