From 11163a6eccf92be15cc4057223bb278453100e50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 1 Nov 2020 21:19:19 +0100 Subject: [PATCH] Continued: - updated to latest version MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/city/exceptions.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/application/city/exceptions.php b/application/city/exceptions.php index 7f4482f..9bdbb44 100644 --- a/application/city/exceptions.php +++ b/application/city/exceptions.php @@ -1,6 +1,7 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -27,7 +28,7 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; */ // The node's own exception handler -function tests_exception_handler ($exceptionInstance) { +function city_exception_handler ($exceptionInstance) { // Is it an object and a valid instance? if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Exception)) { // Init variable @@ -38,14 +39,14 @@ function tests_exception_handler ($exceptionInstance) { // Init argument string $argsString = ''; - // Some argument found? + // Arguments given? if (isset($traceArray['args'])) { // Convert arguments type into human-readable foreach ($traceArray['args'] as $arg) { $argsString .= ', ' . gettype($arg); } // END - foreach $argsString = substr($argsString, 2); - } // END - if + } // Set missing file/line if (!isset($traceArray['file'])) $traceArray['file'] = 'unknown'; @@ -105,7 +106,7 @@ Backtrace: } // Error handler -function tests_error_handler ($errno, $errstr, $errfile, $errline, array $errcontext) { +function city_error_handler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message $message = sprintf('File: %s, Line: %s, Code: %s, Message: %s', basename($errfile), @@ -119,7 +120,7 @@ function tests_error_handler ($errno, $errstr, $errfile, $errline, array $errcon } // END - function // Assertion handler -function tests_assert_handler ($file, $line, $code) { +function city_assert_handler ($file, $line, $code) { // Empty code? if ($code === '') { $code = 'Unknown'; @@ -140,14 +141,14 @@ function tests_assert_handler ($file, $line, $code) { } // END - function // Set error handler -//set_error_handler('tests_error_handler'); +//set_error_handler('city_error_handler'); // Set the new handler -set_exception_handler('tests_exception_handler'); +set_exception_handler('city_exception_handler'); // Init assert handling assert_options(ASSERT_ACTIVE , true); -assert_options(ASSERT_WARNING , false); +assert_options(ASSERT_WARNING , true); assert_options(ASSERT_BAIL , true); assert_options(ASSERT_QUIET_EVAL, false); -assert_options(ASSERT_CALLBACK , 'tests_assert_handler'); +assert_options(ASSERT_CALLBACK , 'city_assert_handler'); -- 2.39.5