]> git.mxchange.org Git - hub.git/blobdiff - application/hub/exceptions.php
Do not call handlePackageByUnhandledPackage() directly, this caused decoding of alrea...
[hub.git] / application / hub / exceptions.php
index 05a27767b08b14c9c21f41df4cdf9b8782754790..340266b067dea208f239b04b44fcf38be8a3a355 100644 (file)
@@ -2,10 +2,9 @@
 /**
  * An include file for setting up the exception handler of the hub
  *
- *
  * @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
@@ -22,7 +21,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-// The hub's own exception handler
+// The node's own exception handler
 function hub_exception_handler ($exceptionInstance) {
        // Is it an object and a valid instance?
        if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof FrameworkException)) {
@@ -111,7 +110,9 @@ function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext)
 // Assertion handler
 function __assertHandler ($file, $line, $code) {
        // Empty code?
-       if ($code === '') $code = '<em>Unknown</em>';
+       if ($code === '') {
+               $code = '<em>Unknown</em>';
+       } // END - if
 
        // Create message
        $message = sprintf("File: %s, Line: %s, Code: %s",
@@ -131,10 +132,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]