Changeset:
        b4333c35d503
        
https://sourceforge.net/p/mrbs/hg-code/ci/b4333c35d5031a480cecbc9b35cb5298f0dde033
Author:
        Campbell Morrison <[email protected]>
Date:
        Sun Oct 02 17:54:37 2016 +0100
Log message:

Slight changes to error output

diffstat:

 web/functions_error.inc |  24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)

diffs (58 lines):

diff -r 8c36a415b797 -r b4333c35d503 web/functions_error.inc
--- a/web/functions_error.inc   Sun Oct 02 16:03:01 2016 +0100
+++ b/web/functions_error.inc   Sun Oct 02 17:54:37 2016 +0100
@@ -48,14 +48,14 @@
   {
     case __NAMESPACE__ . "\\DBException":
     case 'PDOException':
-      $message = get_vocab("fatal_db_error");
+      $fatal_message = get_vocab("fatal_db_error");
       break;
     default:
-      $message = get_vocab("fatal_error");
+      $fatal_message = get_vocab("fatal_error");
       break;
   }
   
-  fatal_error($message, false, false);
+  fatal_error($fatal_message, false, false);
 }
 
 
@@ -71,31 +71,23 @@
     
   if ($show_debug)
   {
-    error_log("MRBS: $message");
-    
-    $sql_error = db()->error();
-    if (!empty($sql_error))
-    {
-      error_log("MRBS: $sql_error");
-    }
-    
-    $e = new Exception();
-    error_log($e->getTraceAsString());
+    trigger_error("MRBS: $message", E_USER_WARNING);
+    trigger_error(print_r(debug_backtrace(), true));
     
     if ($show_form_data)
     {
       if (!empty($_GET))
       {
-        error_log("MRBS GET: " . print_r($_GET, true));
+        trigger_error("MRBS GET: " . print_r($_GET, true));
       }
       if (!empty($_POST))
       {
-        error_log("MRBS POST: " . print_r($_POST, true));
+        trigger_error("MRBS POST: " . print_r($_POST, true));
       }
     }
     if (!empty($_SESSION))
     {
-      error_log("MRBS SESSION: " . print_r($_SESSION, true));
+      trigger_error("MRBS SESSION: " . print_r($_SESSION, true));
     }
   }
   

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to