]> git.mxchange.org Git - core.git/blobdiff - application/tests/exceptions.php
Continued with rewrites:
[core.git] / application / tests / exceptions.php
index e8e4bf360c1541afdcf19b5bf009bbac1831dc57..7248c82c472815af3aadcddd9fc1707af648e611 100644 (file)
@@ -1,12 +1,13 @@
 <?php
 // Import framework stuff
+use CoreFramework\Generic\FrameworkException;
 use CoreFramework\Object\BaseFrameworkSystem;
 
 /**
  * An include file for setting up the exception handler of test suite
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0
+ * @version            0.0.0
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
@@ -27,7 +28,7 @@ use CoreFramework\Object\BaseFrameworkSystem;
 // The node's own exception handler
 function tests_exception_handler ($exceptionInstance) {
        // Is it an object and a valid instance?
-       if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Throwable)) {
+       if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Exception)) {
                // Init variable
                $backTrace = '';
 
@@ -88,7 +89,7 @@ Backtrace:
                print($message);
        } elseif (is_object($exceptionInstance)) {
                // Output more details
-               printf('exceptionInstance=%s' . PHP_EOL, get_class($exceptionInstance));
+               printf('exceptionInstance=%s', print_r($exceptionInstance, TRUE));
        } else {
                /*
                 * Invalid exception instance detected! Do *only* throw exceptions that