]> git.mxchange.org Git - hub.git/blobdiff - application/hub/exceptions.php
Merge branch 'master' into refacuring/protocol_handler
[hub.git] / application / hub / exceptions.php
index ed80b25d53bf563d2c7e5fd9d62d99abb075c727..18642da28013a7d9a5c250f2cddef5be0296477b 100644 (file)
@@ -2,9 +2,9 @@
 /**
  * An include file for setting up the exception handler of the hub
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
@@ -119,6 +119,9 @@ function __assertHandler ($file, $line, $code) {
                $code
        );
 
+       // Log assert
+       syslog(LOG_WARNING, $message);
+
        // Throw an exception here
        throw new AssertionException($message, BaseFrameworkSystem::EXCEPTION_ASSERTION_FAILED);
 } // END - function
@@ -130,11 +133,11 @@ function __assertHandler ($file, $line, $code) {
 set_exception_handler('hub_exception_handler');
 
 // Init assert handling
-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');
+assert_options(ASSERT_ACTIVE    , TRUE);
+assert_options(ASSERT_WARNING   , FALSE);
+assert_options(ASSERT_BAIL      , TRUE);
+assert_options(ASSERT_QUIET_EVAL, FALSE);
+assert_options(ASSERT_CALLBACK  , '__assertHandler');
 
 // [EOF]
 ?>