<?php
// Import framework stuff
use Org\Mxchange\CoreFramework\Assertion\AssertionException;
+use Org\Mxchange\CoreFramework\Error\FatalErrorException;
use Org\Mxchange\CoreFramework\Generic\FrameworkException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @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
*/
// 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
// 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';
}
// 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),
} // END - function
// Assertion handler
-function tests_assert_handler ($file, $line, $code) {
+function city_assert_handler ($file, $line, $code) {
// Empty code?
if ($code === '') {
$code = '<em>Unknown</em>';
} // 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');