]> git.mxchange.org Git - hub.git/blobdiff - application/hub/exceptions.php
Resurrected two methods for DHT database wrapper and used them
[hub.git] / application / hub / exceptions.php
index f219040e6fdb52844ec8e15c0c8c1844df06da30..dbce802e7e1e55f0257982e0b010006d50819063 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
 function hub_exception_handler ($exceptionInstance) {
        // Is it an object and a valid instance?
        if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof FrameworkException)) {
-               // Get the regular trace
-               $trace = $exceptionInstance->getTrace();
-
-               // Get 3 call levels
+               // Init variable
                $backTrace = '';
-               for ($idx = 0; $idx < 3; $idx++) {
-                       // Copy array for argument analysis and init variable
-                       $traceArray = $trace[$idx];
+
+               // Get all call levels from backtrace
+               foreach ($exceptionInstance->getTrace() as $idx => $traceArray) {
+                       // Init argument string
                        $argsString = '';
 
                        // Convert arguments type into human-readable
@@ -60,7 +58,7 @@ Line   : %d\n",
                                basename($traceArray['file']),
                                $traceArray['line']
                        );
-               } // END - for
+               } // END - foreach
 
                // Construct the message
                $message = sprintf("--------------------------------------------------------------------------------
@@ -132,10 +130,10 @@ function __assertHandler ($file, $line, $code) {
 set_exception_handler('hub_exception_handler');
 
 // Init assert handling
-assert_options(ASSERT_ACTIVE,     1);
-assert_options(ASSERT_WARNING,    0);
-assert_options(ASSERT_BAIL,       0);
-assert_options(ASSERT_QUIET_EVAL, 0);
+assert_options(ASSERT_ACTIVE,     true);
+assert_options(ASSERT_WARNING,    false);
+assert_options(ASSERT_BAIL,       false);
+assert_options(ASSERT_QUIET_EVAL, false);
 assert_options(ASSERT_CALLBACK,   '__assertHandler');
 
 // [EOF]