Throwable is PHP 7.x and still this framework should support PHP 5 as 7 is
authorRoland Haeder <roland@mxchange.org>
Thu, 23 Feb 2017 21:03:14 +0000 (22:03 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
still to new. But at least output the whole instance

Signed-off-by: Roland Häder <roland@mxchange.org>
application/tests/exceptions.php

index e8e4bf360c1541afdcf19b5bf009bbac1831dc57..e091a96777a8ee1bf95ebabe2f3c20232b25ce43 100644 (file)
@@ -6,7 +6,7 @@ use CoreFramework\Object\BaseFrameworkSystem;
  * An include file for setting up the exception handler of test suite
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * 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
  *
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
@@ -27,7 +27,7 @@ use CoreFramework\Object\BaseFrameworkSystem;
 // The node's own exception handler
 function tests_exception_handler ($exceptionInstance) {
        // Is it an object and a valid instance?
 // 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 = '';
 
                // Init variable
                $backTrace = '';
 
@@ -88,7 +88,7 @@ Backtrace:
                print($message);
        } elseif (is_object($exceptionInstance)) {
                // Output more details
                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
        } else {
                /*
                 * Invalid exception instance detected! Do *only* throw exceptions that