From: Roland Haeder Date: Thu, 23 Feb 2017 21:03:14 +0000 (+0100) Subject: Throwable is PHP 7.x and still this framework should support PHP 5 as 7 is X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=d2ab9b8eff790d774883e1264b7a99947bdaa3ad Throwable is PHP 7.x and still this framework should support PHP 5 as 7 is still to new. But at least output the whole instance Signed-off-by: Roland Häder --- diff --git a/application/tests/exceptions.php b/application/tests/exceptions.php index e8e4bf36..e091a967 100644 --- a/application/tests/exceptions.php +++ b/application/tests/exceptions.php @@ -6,7 +6,7 @@ use CoreFramework\Object\BaseFrameworkSystem; * An include file for setting up the exception handler of test suite * * @author Roland Haeder - * @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 +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? - if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Throwable)) { + if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Exception)) { // Init variable $backTrace = ''; @@ -88,7 +88,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