]> git.mxchange.org Git - hub.git/blobdiff - inc/classes/exceptions/class_FrameworkException.php
Code merged from ship-simu repository
[hub.git] / inc / classes / exceptions / class_FrameworkException.php
index 3ba2fbec919d38e660886c3750cb5d3a21bef662..c3a2c1a38ff395788fb3eb187d1038ba6b0e217c 100644 (file)
@@ -59,11 +59,20 @@ abstract class FrameworkException extends ReflectionException {
                        );
 
                        // End here
-                       exit;
+                       exit();
                } // END - if
-
                // Make sure everything is assigned properly
                parent::__construct($message, $code);
+
+               // Log it away if DEBUG_ALL is set
+               if (defined('DEBUG_ALL')) {
+                       // Log the error
+                       error_log(sprintf("[%s:] %s (%s)",
+                               $this->__toString(),
+                               $message,
+                               $this->getHexCode()
+                       ));
+               } // END - if
        }
 
        /**
@@ -121,7 +130,7 @@ abstract class FrameworkException extends ReflectionException {
                        } // END - if
 
                        // Prepare argument infos
-                       $info = "<em id=\"debug_args\">{$info}</em>";
+                       $info = "<em id=\"debug_args_".$dbgIndex."\">{$info}</em>";
 
                        // File detection
                        $file = "Unknown file";
@@ -136,7 +145,7 @@ abstract class FrameworkException extends ReflectionException {
                        } // END - if
 
                        // The message
-                       $dbgMsg .= "\t at <em id=\"debug_id\">".$dbgIndex."</em> <em id=\"debug_file\">".$file."</em> (<em id=\"debug_line\">".$line."</em>) -&gt; ".$dbgInfo['function']."(".$info.")<br />\n";
+                       $dbgMsg .= "\t at <em id=\"debug_id_".$dbgIndex."\">".$dbgIndex."</em> <em id=\"debug_file_".$dbgIndex."\">".$file."</em> (<em id=\"debug_line_".$dbgIndex."\">".$line."</em>) -&gt; ".$dbgInfo['function']."(".$info.")<br />\n";
                } // END - if
                $dbgMsg .= "Debug backtrace end<br />\n";