Support for new packaged extensions system.
[fa-stable.git] / includes / errors.inc
index 9e0dba2e87fc99edf3694e96528e6096e74c31b3..16b5be40f4c59c254af75cb26ac2367a77157383 100644 (file)
@@ -108,7 +108,7 @@ function end_flush() {
 
 function display_db_error($msg, $sql_statement=null, $exit=true)
 {
-       global $db, $debug;
+       global $db, $debug, $go_debug;
 
        $warning = $msg==null;
        $db_error = db_error_no();
@@ -128,6 +128,7 @@ function display_db_error($msg, $sql_statement=null, $exit=true)
        if ($debug == 1) 
        {
                $str .= "sql that failed was : " . $sql_statement . "<br>";
+               if ($go_debug > 1) display_backtrace();
        }
        
        $str .= "<br><br>";