]> git.mxchange.org Git - hub.git/commitdiff
Full backtrace now
authorRoland Häder <roland@mxchange.org>
Sun, 26 Aug 2012 11:41:38 +0000 (11:41 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Aug 2012 11:41:38 +0000 (11:41 +0000)
application/hub/exceptions.php

index 340266b067dea208f239b04b44fcf38be8a3a355..dbce802e7e1e55f0257982e0b010006d50819063 100644 (file)
 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("--------------------------------------------------------------------------------