]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 17 Feb 2023 02:57:40 +0000 (03:57 +0100)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Feb 2023 02:57:40 +0000 (03:57 +0100)
- introduced exception code for InvalidArgumentException

58 files changed:
framework/bootstrap/class_FrameworkBootstrap.php
framework/config/class_FrameworkConfiguration.php
framework/loader/class_ClassLoader.php
framework/main/classes/class_BaseFrameworkSystem.php
framework/main/classes/criteria/class_BaseCriteria.php
framework/main/classes/criteria/dataset/class_DataSetCriteria.php
framework/main/classes/criteria/search/class_SearchCriteria.php
framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php
framework/main/classes/database/result/class_CachedDatabaseResult.php
framework/main/classes/factories/class_BaseFactory.php
framework/main/classes/factories/index/class_FileStackIndexFactory.php
framework/main/classes/factories/objects/class_ObjectFactory.php
framework/main/classes/factories/stacks/class_FileStackFactory.php
framework/main/classes/factories/xml/class_XmlTemplateEngineFactory.php
framework/main/classes/feature/class_FrameworkFeature.php
framework/main/classes/file_directories/binary/class_BaseBinaryFile.php
framework/main/classes/file_directories/binary/index/class_IndexFile.php
framework/main/classes/file_directories/binary/stack/class_StackFile.php
framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php
framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php
framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php
framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php
framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php
framework/main/classes/handler/tasks/class_TaskHandler.php
framework/main/classes/helper/class_BaseHelper.php
framework/main/classes/index/file/class_BaseFileIndex.php
framework/main/classes/index/file/stack/class_FileStackIndex.php
framework/main/classes/language/class_LanguageSystem.php
framework/main/classes/lists/class_BaseList.php
framework/main/classes/parser/xml/class_XmlParser.php
framework/main/classes/registry/class_BaseRegistry.php
framework/main/classes/resolver/action/class_BaseActionResolver.php
framework/main/classes/resolver/action/html/class_HtmlActionResolver.php
framework/main/classes/resolver/command/class_BaseCommandResolver.php
framework/main/classes/resolver/command/console/class_ConsoleCommandResolver.php
framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php
framework/main/classes/resolver/command/image/class_ImageCommandResolver.php
framework/main/classes/resolver/controller/class_BaseControllerResolver.php
framework/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php
framework/main/classes/resolver/controller/html/class_HtmlControllerResolver.php
framework/main/classes/resolver/controller/image/class_ImageControllerResolver.php
framework/main/classes/stacker/class_BaseStacker.php
framework/main/classes/stacker/fifo/class_FiFoStacker.php
framework/main/classes/stacker/file/class_BaseFileStack.php
framework/main/classes/stacker/file/fifo/class_FiFoFileStack.php
framework/main/classes/stacker/filo/class_FiLoStacker.php
framework/main/classes/template/class_BaseTemplateEngine.php
framework/main/classes/template/xml/class_BaseXmlTemplateEngine.php
framework/main/classes/tools/console/class_ConsoleTools.php
framework/main/classes/user/guest/class_Guest.php
framework/main/classes/user/member/class_Member.php
framework/main/classes/utils/arrays/class_ArrayUtils.php
framework/main/classes/utils/crypto/class_CryptoUtils.php
framework/main/classes/utils/strings/class_StringUtils.php
framework/main/interfaces/class_FrameworkInterface.php
framework/main/middleware/database/class_DatabaseConnection.php
framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php
framework/main/tests/resolver/controller/class_TestsConsoleControllerResolver.php

index 92dca68ecd641361c20ce12d787c618aa3174049..de4aac3ddb6fc10d6c560ee84871a8d95c1de497 100644 (file)
@@ -9,6 +9,7 @@ use Org\Mxchange\CoreFramework\Connector\Database\DatabaseConnector;
 use Org\Mxchange\CoreFramework\Console\Tools\ConsoleTools;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
@@ -483,7 +484,7 @@ final class FrameworkBootstrap {
                // Is it set?
                if (empty($timezone)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('timezone is empty');
+                       throw new InvalidArgumentException('Parameter "timezone" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Default success
index f5d60c179c361ad1918213942862ec20fb57a81c..b9c549aa60e1bfd52adaafa0479dd5d7eeaad661 100644 (file)
@@ -90,7 +90,7 @@ class FrameworkConfiguration implements Registerable {
                //* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
                if (empty($configKey)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it set?
@@ -114,7 +114,7 @@ class FrameworkConfiguration implements Registerable {
                //* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
                if (empty($configKey)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Convert dashes to underscore
@@ -146,7 +146,7 @@ class FrameworkConfiguration implements Registerable {
                //* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s,configValue[]=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey, gettype($configValue));
                if (empty($configKey)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((is_array($configValue)) || (is_object($configValue)) || (is_resource($configValue))) {
                        // These cannot be set as this is not intended for configuration values, please use FrameworkArrayObject instead.
                        throw new InvalidArgumentException(sprintf('configValue[]=%s for configKey=%s is not supported.', gettype($configValue), $configKey), self::EXCEPTION_CONFIG_VALUE_TYPE_UNSUPPORTED);
@@ -201,7 +201,7 @@ class FrameworkConfiguration implements Registerable {
                //* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
                if (empty($configKey)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Convert dashes to underscore
@@ -235,7 +235,7 @@ class FrameworkConfiguration implements Registerable {
                //* NOISY-DEBUG: */ printf('[%s:%d]: keyPart=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $keyPart);
                if (empty($keyPart)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('Parameter "keyPart" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('Parameter "keyPart" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Construct final config key
index 7764cb3d00dac5fc4c7e2b081dc18af4c71dfbda..b31d21fbc455ab8531cf530f3261070eaaca2742 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Loader;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 
 // Import SPL stuff
 use \InvalidArgumentException;
@@ -347,7 +348,7 @@ final class ClassLoader {
                // Validate parameter
                if (empty($relativePath)) {
                        // Should not be empty
-                       throw new InvalidArgumentException('Parameter "relativePath" is empty');
+                       throw new InvalidArgumentException('Parameter "relativePath" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // "Register" it
@@ -370,7 +371,7 @@ final class ClassLoader {
                //* NOISY-DEBUG: */ printf('[%s:%d] className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
                if (empty($className)) {
                        // Should not be empty
-                       throw new InvalidArgumentException('Parameter "className" is empty');
+                       throw new InvalidArgumentException('Parameter "className" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // The class name MUST be at least Tld\Domain\Project\Package\SomeFooBar so split at them
@@ -446,7 +447,7 @@ final class ClassLoader {
                //* NOISY-DEBUG: */ printf('[%s:%d] basePath=%s,ignoreList()=%d - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $basePath, count($ignoreList));
                if (empty($basePath)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "basePath" is empty');
+                       throw new InvalidArgumentException('Parameter "basePath" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->listCached === true) {
                        // Abort here
                        //* NOISY-DEBUG: */ printf('[%s:%d] this->listCache=true - EXIT!' . PHP_EOL, __METHOD__, __LINE__);
index 63f0ae6094231191e5157f87d50a1e16b3c30302..822debf99fbfd5ac4c7fbca6c0eff4c311a3d695 100644 (file)
@@ -602,7 +602,7 @@ Loaded includes:
                // Validate parameter
                if (empty($className)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "className" is empty');
+                       throw new InvalidArgumentException('Parameter "className" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!GenericRegistry::getRegistry()->instanceExists('debug')) {
                        // Init debug instance
                        $debugInstance = NULL;
@@ -799,7 +799,7 @@ Loaded includes:
                // Check parameter
                if (empty($fieldName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "fieldName" is empty');
+                       throw new InvalidArgumentException('Parameter "fieldName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // This method is deprecated
@@ -852,7 +852,7 @@ Loaded includes:
                // Check parameter
                if (empty($fieldName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "fieldName" is empty');
+                       throw new InvalidArgumentException('Parameter "fieldName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get result instance
@@ -914,7 +914,7 @@ Loaded includes:
                // Check parameter
                if (empty($phpExtension)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "phpExtension" is empty');
+                       throw new InvalidArgumentException('Parameter "phpExtension" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it loaded?
@@ -984,7 +984,7 @@ Loaded includes:
                // Check parameter
                if (empty($encodedData)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "encodedData" is empty');
+                       throw new InvalidArgumentException('Parameter "encodedData" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Determine it
@@ -1030,16 +1030,16 @@ Loaded includes:
                // Check parameter
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it there?
@@ -1062,13 +1062,13 @@ Loaded includes:
                // Check parameter
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it there?
@@ -1092,10 +1092,10 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it there?
@@ -1119,10 +1119,10 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',value=' . print_r($this->genericArray[$keyGroup][$subGroup], true));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayGroupSet($keyGroup, $subGroup)) {
                        // No, then abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s not found.', $keyGroup, $subGroup));
@@ -1146,13 +1146,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Remove it
@@ -1174,16 +1174,16 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Remove it
@@ -1205,13 +1205,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',value[' . gettype($value) . ']=' . print_r($value, true) . ',appendGlue=' . $appendGlue);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it already there?
@@ -1240,16 +1240,16 @@ Loaded includes:
                //* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',value[' . gettype($value) . ']=' . print_r($value, true) . ',appendGlue=' . $appendGlue);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is it already there?
@@ -1278,10 +1278,10 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',forceInit=' . intval($forceInit));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (($forceInit === false) && ($this->isGenericArrayGroupSet($keyGroup, $subGroup))) {
                        // Already initialized
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s already initialized.', $keyGroup, $subGroup));
@@ -1307,13 +1307,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',forceInit=' . intval($forceInit));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (($forceInit === false) && ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key))) {
                        // Already initialized
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s already initialized.', $keyGroup, $subGroup, gettype($key), $key));
@@ -1340,16 +1340,16 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',forceInit=' . intval($forceInit));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (($forceInit === false) && ($this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element))) {
                        // Already initialized
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s,element[%s]=%s already initialized.', $keyGroup, $subGroup, gettype($key), $key, gettype($element), $element));
@@ -1374,13 +1374,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',value[' . gettype($value) . ']=' . print_r($value, true));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
                        // Initialize array
                        $this->initGenericArrayKey($keyGroup, $subGroup, $key);
@@ -1411,16 +1411,16 @@ Loaded includes:
                //* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',value[' . gettype($value) . ']=' . print_r($value, true));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) {
                        // Initialize array
                        $this->initGenericArrayElement($keyGroup, $subGroup, $key, $element);
@@ -1450,13 +1450,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
                        // Not found
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
@@ -1486,13 +1486,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
                        // Not found
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
@@ -1520,7 +1520,7 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset($this->genericArray[$keyGroup])) {
                        // Not found
                        throw new BadMethodCallException(sprintf('keyGroup=%s not found.', $keyGroup));
@@ -1548,10 +1548,10 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayGroupSet($keyGroup, $subGroup)) {
                        // Abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s not found.', $keyGroup, $subGroup));
@@ -1580,13 +1580,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
                        // Abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
@@ -1616,7 +1616,7 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset($this->genericArray[$keyGroup])) {
                        // Then abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s not found', $keyGroup));
@@ -1642,13 +1642,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',value[' . gettype($value) . ']=' . print_r($value, true));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isValidGenericArrayGroup($keyGroup, $subGroup)) {
                        // Then abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s not found', $keyGroup));
@@ -1673,13 +1673,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
                        // Then abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
@@ -1705,16 +1705,16 @@ Loaded includes:
                //* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',value[' . gettype($value) . ']=' . print_r($value, true));
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) {
                        // Initialize array
                        $this->initGenericArrayElement($keyGroup, $subGroup, $key, $element);
@@ -1740,16 +1740,16 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($element === '') {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "element" is empty');
+                       throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) {
                        // Then abort here
                        throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s,element[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key, gettype($element), $element));
@@ -1772,10 +1772,10 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Determine it
@@ -1798,13 +1798,13 @@ Loaded includes:
                //* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
                if (empty($keyGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Determine it
index 0931688faddedee6f8bb7d0d6f846a00eeac7341..b9e860659dcde77095ba2654cbffdd625e8060dc 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Criteria;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
 
@@ -80,7 +81,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaType));
                if (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -105,13 +106,13 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaType=%s,criteriaKey=%s - CALLED!', strtoupper($criteriaType), $criteriaType, $criteriaKey));
                if (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
                } elseif (empty($criteriaKey)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -138,7 +139,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
                if (empty($criteriaKey)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Invoke inner method
@@ -158,7 +159,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
                if (empty($criteriaKey)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Invoke inner method
@@ -198,7 +199,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaType));
                if (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -240,7 +241,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
                if (empty($criteriaKey)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -277,7 +278,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaValue[]=%s,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, gettype($criteriaValue), $criteriaType));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -286,7 +287,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException(sprintf('value[]=%s is not supported', gettype($criteriaValue)));
                } elseif (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -319,7 +320,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaValue[]=%s$criteriaValue,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, gettype($criteriaValue), $criteriaType));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -328,7 +329,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException(sprintf('value[]=%s is not supported', gettype($criteriaValue)));
                } elseif (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -360,7 +361,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s,criteriaValue[]=%s - CALLED!', $criteriaKey, gettype($criteriaValue)));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -391,7 +392,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s,criteriaValue[%s]=%s - CALLED!', $criteriaKey, gettype($criteriaValue), $criteriaValue));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -422,16 +423,16 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,configEntry=%s,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, $configEntry, $criteriaType));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
                } elseif (empty($configEntry)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "configEntry" is empty');
+                       throw new InvalidArgumentException('Parameter "configEntry" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -462,13 +463,13 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, $criteriaType));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
                } elseif (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -505,7 +506,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -528,7 +529,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
                if (empty($criteriaKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
@@ -556,7 +557,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('entryArray cannot be an empty array');
                } elseif (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
@@ -663,7 +664,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: onlyKeys()=%d,criteriaType=%s - CALLED!', strtoupper($criteriaType), count($onlyKeys), $criteriaType));
                if (empty($criteriaType)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+                       throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
                        throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
index d05befee51ef65afb23b270168e17ea49dba2463..e5f8621b36ed3f7dfd3e348515c3872cc5780b77 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Criteria\BaseCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 
 // Import SPL stuff
 use \InvalidArgumentException;
@@ -80,7 +81,7 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria {
                // Validate parameter
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get a new instance
index eab26c60ffd71a3a95bcf5660b67ea4753f61638..87dd7156c63970e6d7f0ae065a45207556c913c4 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Criteria\Search;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Criteria\BaseCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 
 // Import SPL stuff
 use \InvalidArgumentException;
@@ -140,13 +141,13 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SEARCH-CRITERIA: key=%s,value[]=%s,separator=%s - CALLED!', $key, gettype($value), $separator));
                if (empty($key)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "key" is empty');
+                       throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (is_array($value) || is_bool($value) || is_bool($value) || is_object($value) || is_resource($value)) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('value[]=%s is not supported/valid', gettype($value)));
                } elseif (empty($separator)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "separator" is empty');
+                       throw new InvalidArgumentException('Parameter "separator" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // "Explode" value
index a4ef4ffcc0f6b8807063f2e19d006ca2d081fcc2..67b5f95b5f113982298f8fff2e361a8a2b9d704f 100644 (file)
@@ -369,7 +369,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: tableName=%s,searchInstance=%s - CALLED!', $tableName, $searchInstance->__toString()));
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset($this->pathNames[$tableName])) {
                        // "Cache" is not present, so create and assign it
                        $this->pathNames[$tableName] = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR;
@@ -540,7 +540,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                // Is "cache" there?
                if (empty($tableName)) {
                        // Should never be an empty string
-                       throw new UnexpectedValueException('Class field dataSetInstance->tableName is empty');
+                       throw new UnexpectedValueException('Class field dataSetInstance->tableName is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset($this->pathNames[$tableName])) {
                        // "Cache" is not present, so create and assign it
                        $this->pathNames[$tableName] = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR;
@@ -655,7 +655,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                // Validate parameter
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Default key is null
@@ -699,7 +699,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: tableName=' . $tableName . ' - CALLED!');
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset($this->pathNames[$tableName])) {
                        // "Cache" is not present, so create and assign it
                        $this->pathNames[$tableName] = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR;
index 0e6b9fe83b12674bc5437fbd72d7f4b5aebfee13..95a1400a881b57b35222ef4950cafa906a77de1a 100644 (file)
@@ -95,7 +95,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul
                // Misses an element?
                if (count($resultArray) == 0) {
                        // Cannot be empty
-                       throw new InvalidArgumentException('Array "resultArray" is empty');
+                       throw new InvalidArgumentException('Array "resultArray" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!array_key_exists(BaseDatabaseResult::RESULT_NAME_ROWS, $resultArray)) {
                        // Yes, then abort here
                        throw new InvalidArgumentException(sprintf('resultArray(%d)=%s has no element "%s".', count($resultArray), print_r($resultArray, TRUE), BaseDatabaseResult::RESULT_NAME_ROWS));
index 73f534d2e28966e23c789a449ad38614cc29a2eb..09f240cecf4ffbe031a539da94d6f344aaa4b2a3 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Factory;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
 // Import SPL stuff
@@ -63,7 +64,7 @@ abstract class BaseFactory extends BaseFrameworkSystem {
                // Is the parameter valid?
                if (empty($fullClassName)) {
                        // No empty class name
-                       throw new InvalidArgumentException('fullClassName is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('fullClassName is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Count it up in total sum
@@ -109,7 +110,7 @@ abstract class BaseFactory extends BaseFrameworkSystem {
                // Is the parameter valid?
                if (empty($fullClassName)) {
                        // No empty class name
-                       throw new InvalidArgumentException('fullClassName is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('fullClassName is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Return isset() result
index 8e144c30a44c82ab29bd277cc88bfd1a8600ef3e..af2bd401afe36841ab24cbb1eebdf1a5f1a79883 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Factory\Stack\File;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\BaseFactory;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 // Import SPL stuff
@@ -55,7 +56,7 @@ class FileStackIndexFactory extends BaseFactory {
                // If there is no handler?
                if (empty($type)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "type" is empty');
+                       throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (GenericRegistry::getRegistry()->instanceExists($type . '_index')) {
                        // Get handler from registry
                        $indexInstance = GenericRegistry::getRegistry()->getInstance($type . '_index');
index 000f4b2650722209502aee0fd0bcb19c835aa6ef..94a850191bd69f7ca218fa1bcd144ab39c279ccd 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Factory\Object;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Loader\NoClassException;
 
 // Import SPL stuff
@@ -59,7 +60,7 @@ class ObjectFactory extends BaseFactory {
                // Is the class name valid and is the class there?
                if (empty($fullClassName)) {
                        // Throw an exception here
-                       throw new InvalidArgumentException('Parameter "fullClassName" is empty');
+                       throw new InvalidArgumentException('Parameter "fullClassName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!self::isClassCounted($fullClassName) && !class_exists($fullClassName)) {
                        // First get an instance of this factory
                        $factoryInstance = new ObjectFactory();
index dcb22f623d8a7dc5693fb116fe4d3d65622cea1f..5590785f02f169fa9aad40e2da98ecef1d75f7a6 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Factory\Stack;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\BaseFactory;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 // Import SPL stuff
@@ -57,10 +58,10 @@ class FileStackFactory extends BaseFactory {
                //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-FACTORY: prefix=%s,stackName=%s - CALLED!', $prefix, $stackName));
                if (empty($prefix)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "prefix" is empty');
+                       throw new InvalidArgumentException('Parameter "prefix" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($stackName)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Paramter "stackName" is empty');
+                       throw new InvalidArgumentException('Paramter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Construct file stack name
index b9eddb491ae1e0b1996db432c651668d21dfee3f..4f51b923458323c7368969062d98d4561608c49a 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Factory\Template;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\BaseFactory;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 
 // Import SPL stuff
@@ -58,7 +59,7 @@ class XmlTemplateEngineFactory extends BaseFactory {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-TEMPLATE-ENGINE-FACTORY: configKey=%s - CALLED!', $configKey));
                if (empty($configKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Paramter "configKey" is empty');
+                       throw new InvalidArgumentException('Paramter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Do we have an instance in the registry?
index db57e5cc6759c3bd90bb775397c411eb0340c5e6..f3597d2de15d930295d36591b76c45c85879b85c 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Feature;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Loader\NoClassException;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
@@ -83,7 +84,7 @@ class FrameworkFeature extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: featureName=%s - CALLED!', $featureName));
                if (empty($featureName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "featureName" is empty');
+                       throw new InvalidArgumentException('Parameter "featureName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is the cache set?
@@ -116,7 +117,7 @@ class FrameworkFeature extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: featureName=%s - CALLED!', $featureName));
                if (empty($featureName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "featureName" is empty');
+                       throw new InvalidArgumentException('Parameter "featureName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is the cache set?
index 3f0ff4b612e106f9b2df4f2201ae8a1d524dc1ee..9518bd5e75907d92c8c30cceeb1263e58d83571e 100644 (file)
@@ -8,6 +8,7 @@ use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseAbstractFile;
 use Org\Mxchange\CoreFramework\Filesystem\FilePointer;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Traits\Index\IndexableTrait;
 use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait;
 
@@ -458,7 +459,7 @@ abstract class BaseBinaryFile extends BaseAbstractFile implements BinaryFile {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-BINARY-FILE: str=%s - CALLED!', $str));
                if (empty($str)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "str" is empty');
+                       throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Determine it
@@ -487,7 +488,7 @@ abstract class BaseBinaryFile extends BaseAbstractFile implements BinaryFile {
                        throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid', $seekPosition));
                } elseif (empty($data)) {
                        // Empty data is invalid, too
-                       throw new InvalidArgumentException('Parameter "data" is empty');
+                       throw new InvalidArgumentException('Parameter "data" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Write data at given position
@@ -535,7 +536,7 @@ abstract class BaseBinaryFile extends BaseAbstractFile implements BinaryFile {
                        throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition));
                } elseif (empty($dataStream)) {
                        // Empty dataStream
-                       throw new InvalidArgumentException('Parameter "dataStream" is empty');
+                       throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call pointer's method
@@ -897,7 +898,7 @@ abstract class BaseBinaryFile extends BaseAbstractFile implements BinaryFile {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-BINARY-FILE: type=%s,minimumBlockLength=%d - CALLED!', $type, $minimumBlockLength));
                if (empty($type)) {
                        // Empty type
-                       throw new InvalidArgumentException('Parameter "type" is empty');
+                       throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($minimumBlockLength < 1) {
                        // Invalid block length
                        throw new InvalidArgumentException(sprintf('Parameter minimumBlockLength=%d is not valid', $minimumBlockLength));
index 10bc85203cf27136767c7088e82ba49cc95e26ac..78dac38ed79defa7dc6fe5d949ac6415d7dfeba6 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Filesystem\Index;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
 use Org\Mxchange\CoreFramework\Filesystem\Index\IndexableFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Index\Indexable;
 use Org\Mxchange\CoreFramework\Utils\Crypto\CryptoUtils;
@@ -112,7 +113,7 @@ class IndexFile extends BaseBinaryFile implements IndexableFile {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: type=%s - CALLED!', $type));
                if (empty($type)) {
                        // Empty type
-                       throw new InvalidArgumentException('Parameter "type" is empty');
+                       throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!($this->getIndexInstance() instanceof Indexable)) {
                        // Index instance not set
                        throw new BadMethodCallException('this->indexInstance[] is not properly set.');
@@ -208,7 +209,7 @@ class IndexFile extends BaseBinaryFile implements IndexableFile {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: stackName=%s,value[]=%s - CALLED!', $stackName, gettype($value)));
                if (empty($stackName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "stackName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (is_object($value) || is_resource($value)) {
                        // Not wanted here
                        throw new InvalidArgumentException(sprintf('value[]=%s is not stackable in files', gettype($value)));
index 13991972c6b30c9064fb4a6a440d1011ba64c994..f93dd76953b3f43f7984fcba3d10b3b8fad9568b 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Stack\File;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Filesystem\Stack\FileStacker;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Stack\File\StackableFile;
 use Org\Mxchange\CoreFramework\Utils\Crypto\CryptoUtils;
@@ -110,7 +111,7 @@ class StackFile extends BaseBinaryFile implements FileStacker {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STACK-FILE: type=%s - CALLED!', $type));
                if (empty($type)) {
                        // Empty type
-                       throw new InvalidArgumentException('Parameter "type" is empty');
+                       throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!($this->getStackInstance() instanceof StackableFile) && !($this->getStackInstance() instanceof StackableFile)) {
                        // Index instance not set
                        throw new BadMethodCallException('this->stackInstance[] and this->pointerInstance are not properly set.');
@@ -206,7 +207,7 @@ class StackFile extends BaseBinaryFile implements FileStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STACK-FILE: stackName=%s,value[]=%s - CALLED!', $stackName, gettype($value)));
                if (empty($stackName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "stackName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (is_object($value) || is_resource($value)) {
                        // Not wanted here
                        throw new InvalidArgumentException(sprintf('value[]=%s is not stackable in files', gettype($value)));
index b4f79334e1dfaf58f33b2f6a5bdb861b8e077a70..efc3e0d24107483c34167cbe7c8f792eb63fbd4c 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Filesytem\Pointer;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Filesystem\FrameworkDirectory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
@@ -84,7 +85,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                // Some pre-sanity checks...
                if (empty($pathName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "pathName" is empty');
+                       throw new InvalidArgumentException('Parameter "pathName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!is_dir($pathName)) {
                        // Not a directory
                        throw new PathIsNoDirectoryException($pathName, self::EXCEPTION_INVALID_PATH_NAME);
index dc326cfaa7c5cc7e8f666bc5b643a7944f4a0ecf..54a18ac783717024406547b7940a995443b19950 100644 (file)
@@ -9,6 +9,7 @@ use Org\Mxchange\CoreFramework\Filesystem\FileIoException;
 use Org\Mxchange\CoreFramework\Filesystem\FileReadProtectedException;
 use Org\Mxchange\CoreFramework\Filesystem\FileWriteProtectedException;
 use Org\Mxchange\CoreFramework\Filesystem\PathWriteProtectedException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
@@ -128,7 +129,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-INPUT-OUTPUT-POINTER: dataStream(%d)=%s - CALLED!', strlen($dataStream), $dataStream));
                if (empty($dataStream)) {
                        // Empty dataStream
-                       throw new InvalidArgumentException('Parameter "dataStream" is empty');
+                       throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get length
@@ -160,7 +161,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
                        throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition));
                } elseif (empty($dataStream)) {
                        // Empty dataStream
-                       throw new InvalidArgumentException('Parameter "dataStream" is empty');
+                       throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (($this->getFileSize() > 0 || $seekPosition > 0) && $this->seek($seekPosition) === -1) {
                        // Could not seek
                        throw new InvalidArgumentException(sprintf('Could not seek to seekPosition=%d', $seekPosition));
index c6e4712857bce8cf9dd5b2a7896b446f8ebae4bd..9c242a1128021bf3c1cf8261fb3d8287e3f28e31 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Filesystem\Pointer\Output;
 use Org\Mxchange\CoreFramework\Filesystem\BaseFileIo;
 use Org\Mxchange\CoreFramework\Filesystem\FileIoException;
 use Org\Mxchange\CoreFramework\Filesystem\Pointer\OutputPointer;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 
 // Import SPL stuff
@@ -61,7 +62,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: fileInstance=%s,mode=%s - CALLED!', $fileInstance->__toString(), $mode));
                if (empty($mode)) {
                        // No fileInstance given
-                       throw new InvalidArgumentException('Parameter "mode" is empty');
+                       throw new InvalidArgumentException('Parameter "mode" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Try to open a handler
@@ -102,7 +103,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: dataStream(%d)=%s (trimmed) - CALLED!', strlen($dataStream), trim($dataStream)));
                if (empty($dataStream)) {
                        // Empty data stream
-                       throw new InvalidArgumentException('Parameter "dataStream" is empty');
+                       throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (is_null($this->getFileObject())) {
                        // Pointer not initialized
                        throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
index 51562b218147d063e41abe730bd615f2cca4c812..0df017c4b7c1d057ac9485759d0cab29cf116390 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Filesystem\Pointer\Text;
 use Org\Mxchange\CoreFramework\Filesystem\BaseFileIo;
 use Org\Mxchange\CoreFramework\Filesystem\FileIoException;
 use Org\Mxchange\CoreFramework\Filesystem\Pointer\OutputPointer;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 
@@ -62,7 +63,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEXT-FILE-OUTPUT-POINTER: fileInstance[%s]=%s,mode=%s - CALLED!', get_class($fileInstance), $fileInstance->__toString(), $mode));
                if (empty($mode)) {
                        // No filename given
-                       throw new InvalidArgumentException('Parameter "mode" is empty');
+                       throw new InvalidArgumentException('Parameter "mode" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Try to open a handler
@@ -99,7 +100,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEXT-FILE-OUTPUT-POINTER: dataStream=%s - CALLED!', $dataStream));
                if (empty($dataStream)) {
                        // Invalid parameter
-                       throw new InvalidArgumentException('Parameter "dataStream" is empty');
+                       throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (is_null($this->getFileObject())) {
                        // Pointer not initialized
                        throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
index 222443146380bd3a88c08071d34b75f63992c12f..85771a7f21c2a96b55c91ab878c12723787a768f 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Filesystem\Input\Csv;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Filesystem\Text\BaseInputTextFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Stream\Filesystem\CsvInputStreamer;
 
 // Import SPL stuff
@@ -77,7 +78,7 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] columnSeparator=%s,expectedMatches=%d - CALLED!', __METHOD__, __LINE__, $columnSeparator, $expectedMatches));
                if (strlen($columnSeparator) === 0) {
                        // No empty column separator
-                       throw new InvalidArgumentException('Parameter "columnSeparator" is empty');
+                       throw new InvalidArgumentException('Parameter "columnSeparator" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($expectedMatches < 0) {
                        // Below zero is not valid
                        throw new InvalidArgumentException(sprintf('expectedMatches=%d is below zero', $expectedMatches));
index c8801b7de0c2eb8dbfb7f90048115b3ccca21412..9d23725f1c8e4cc22920626820774b5bd18679cf 100644 (file)
@@ -240,7 +240,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                // Is the parameter valid
                if (empty($taskName)) {
                        // Task name cannot be empty
-                       throw new InvalidArgumentException('Parameter "taskName" is empty');
+                       throw new InvalidArgumentException('Parameter "taskName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get interval delay, startup delay and max runs
index 35138c3277ab15407f9c820bc26411ba35ad536b..451cab9c257a4b4537de00f2e48e7b1a2ff42cc4 100644 (file)
@@ -218,7 +218,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
                //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('O:'.$registryKey.'/'.$extraKey);
                if (empty($registryKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "registryKey" is empty');
+                       throw new InvalidArgumentException('Parameter "registryKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                try {
@@ -265,7 +265,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
                //* DEBUG: */ echo "OPEN:groupId={$groupId},content=<pre>".htmlentities($content)."</pre>\n";
                if (empty($groupId)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupId" is empty');
+                       throw new InvalidArgumentException('Parameter "groupId" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (isset($this->groups[$groupId])) {
                        // Then throw an exception here
                        throw new HelperGroupAlreadyCreatedException(array($this, $groupId), self::EXCEPTION_GROUP_ALREADY_FOUND);
@@ -355,7 +355,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
                // Is the group already there?
                if (empty($subGroupId)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "subGroupId" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroupId" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (isset($this->subGroups[$subGroupId])) {
                        // Then throw an exception here
                        throw new HelperSubGroupAlreadyCreatedException(array($this, $subGroupId), self::EXCEPTION_SUB_GROUP_ALREADY_FOUND);
index 39f1cbff3bb52f62b8ac82df7def45f12bf20e3a..b0a247720655139203f10310b27dead9351e14a7 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
 use Org\Mxchange\CoreFramework\Filesystem\File\BinaryFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Index\BaseIndex;
 use Org\Mxchange\CoreFramework\Index\Indexable;
 use Org\Mxchange\CoreFramework\Utils\Arrays\ArrayUtils;
@@ -315,7 +316,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                        throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition));
                } elseif (empty($dataStream)) {
                        // Empty dataStream
-                       throw new InvalidArgumentException('Parameter "dataStream" is empty');
+                       throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call iterated object's method
index 4bea7db9290d9e137f2da2890f85cb4259715daf..6cf2742f9e024179751b7ef1dfe750b201d89eea 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Index\File\Stack;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Index\File\BaseFileIndex;
 use Org\Mxchange\CoreFramework\Index\File\Stack\IndexableStack;
 use Org\Mxchange\CoreFramework\Index\Indexable;
@@ -80,7 +81,7 @@ class FileStackIndex extends BaseFileIndex implements IndexableStack, Registerab
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: stackName=%s,data()=%d - CALLED!', $stackName, count($data)));
                if (empty($stackName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "stackName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (count($data) == 0) {
                        // Throw it again
                        throw new InvalidArgumentException('Parameter "data" is an empty array');
index ee41676a0044db4a29ecb01f5d53ae772048a1e0..bc4b36735452f14155d79867e30762fc7e362dcc 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Localization;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\ObjectArray\FrameworkArrayObject;
@@ -100,7 +101,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
                // Is the base path valid?
                if (empty($languageBasePath)) {
                        // Language path is empty
-                       throw new InvalidArgumentException('languageBasePath is still empty');
+                       throw new InvalidArgumentException('languageBasePath is still empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!is_dir($languageBasePath)) {
                        // Is not a path
                        throw new InvalidArgumentException(sprintf('languageBasePath=%s not found', $languageBasePath), self::EXCEPTION_INVALID_PATH_NAME);
index 0e581e8a6697f1b5858e0aee44dd25cf034bbff3..22aba2d3acb83b51b64903751789141a2d5296d6 100644 (file)
@@ -113,7 +113,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-LIST: groupName=%s - CALLED!', $groupName));
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Check on existence ...
@@ -132,7 +132,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-LIST: groupName=%s - CALLED!', $groupName));
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is already set', $groupName), self::EXCEPTION_GROUP_ALREADY_ADDED);
@@ -157,10 +157,10 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName=' . $groupName  . ',subGroup=' . $subGroup . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($subGroup)) {
                        // Throw it again
-                       throw new InvalidArgumentException('Parameter "subGroup" is empty');
+                       throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
@@ -198,7 +198,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName[' . gettype($groupName) . ']=' . $groupName . ' - CALLED!');
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
@@ -243,7 +243,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName=' . $groupName . ' - CALLED!');
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
@@ -281,7 +281,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName=' . $groupName . ' - CALLED!');
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
@@ -377,7 +377,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                // Does this group exist?
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
@@ -410,7 +410,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                // Validate parameter
                if (empty($hash)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "hash" is empty');
+                       throw new InvalidArgumentException('Parameter "hash" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset($this->cache['is_valid'][$hash])) {
                        // Check it
                        $this->cache['is_valid'][$hash] = ((in_array($hash, $this->listIndex)) && (isset($this->listEntries[$hash])));
@@ -470,7 +470,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-LIST: groupName=%s - CALLED!', $groupName));
                if (empty($groupName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "groupName" is empty');
+                       throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isGroupSet($groupName)) {
                        // Throw the exception here
                        throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
@@ -517,7 +517,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
                // Is the hash valid?
                if (empty($hash)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "hash" is empty');
+                       throw new InvalidArgumentException('Parameter "hash" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isHashValid($hash)) {
                        // Throw an exception here, hashIndex is unknown at this point
                        throw new InvalidListHashException(array($this, $hash, -999), self::EXCEPTION_INVALID_HASH);
index 79da56dab8d6c6ed8e970603c6a159f7db85fa39..ce764424a5758a72d7abd4e0a07b64bb6d995146 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Parser\Xml;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Parser\BaseParser;
 use Org\Mxchange\CoreFramework\Parser\Parseable;
 use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
@@ -71,7 +72,7 @@ class XmlParser extends BaseParser implements Parseable {
                // Convert all to UTF8
                if (empty($content)) {
                        // No empty content
-                       throw new InvalidArgumentException('content is empty');
+                       throw new InvalidArgumentException('content is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (function_exists('recode')) {
                        // Recode found, so use it
                        $content = recode('html..utf8', $content);
index 1cedaab0c233b6eafabe295c18b38b89fe2d4004..edbbfb13e051887fe1ad17b28a290dbd571ea6f3 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Registry;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Traits\Iterator\IteratorTrait;
@@ -109,7 +110,7 @@ abstract class BaseRegistry extends BaseFrameworkSystem implements Register, Reg
                // Validate parameter
                if (empty($instanceKey)) {
                        // Throw IAE
-                       throw new InvalidArgumentExeption('Parameter "instanceKey" is empty');
+                       throw new InvalidArgumentExeption('Parameter "instanceKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Set entry in generic array
index 2832256d67a66582088834eeeb9797a6bfbb6f5e..b66a5aceb4817d593e85f1461dc35b34503f763f 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Action;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
 use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
 
@@ -80,10 +81,10 @@ abstract class BaseActionResolver extends BaseResolver {
                // Is a action set?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($actionName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "actionName" is empty');
+                       throw new InvalidArgumentException('Parameter "actionName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Create class name
index 2c36a2cc83017d26751ed76bc7faaf720c6332b5..3c08e1a6b26d9882e7084484a0588207d6da7d07 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Action;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 
 // Import SPL stuff
@@ -65,7 +66,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                // Is the variable $actionName set and the action is valid?
                if (empty($actionName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "actionName" is empty');
+                       throw new InvalidArgumentException('Parameter "actionName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isActionValid($actionName) === false) {
                        // Invalid action found
                        throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
index a49cd88ba5cb0c01d984534445a75534d303d2bf..01f135973f2ce9051d5d0ef9e64c9e0f938aff31 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
 use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
@@ -167,10 +168,10 @@ abstract class BaseCommandResolver extends BaseResolver {
                // Is a action set?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+                       throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Initiate the instance variable
@@ -211,10 +212,10 @@ abstract class BaseCommandResolver extends BaseResolver {
                // Is namespace and command name set?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+                       throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // By default nothing shall be valid
index 46095e2c9731982bc5589218b6c0fdfa03f4898d..15233a635ed2d17b72bac746a56b53e409ba99c8 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Command;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 
 // Import SPL stuff
@@ -62,10 +63,10 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol
                // Is the variable $commandName set and the command is valid?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+                       throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$resolverInstance->isCommandValid($namespace, $commandName)) {
                        // Invalid command found
                        throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
index 78229a10dde77e58074fff4018c0fa2e04b6db5e..086af0a3a6814a8eca045f00e47e45290a7d225b 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Command;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 
 // Import SPL stuff
@@ -65,7 +66,7 @@ class HtmlCommandResolver extends BaseCommandResolver implements CommandResolver
                // Is the variable $commandName set and the command is valid?
                if (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+                       throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isCommandValid($commandName) === false) {
                        // Invalid command found
                        // @TODO Missing namespace!
index c799155e19b3ed8b7c294da166e5f52961d6f991..d5ced68a47f3ca355e4fb55efdf0e14784e821d4 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Command;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 
 // Import SPL stuff
@@ -65,7 +66,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve
                // Is the variable $commandName set and the command is valid?
                if (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+                       throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isCommandValid($commandName) === false) {
                        // @TODO Missing namespace!
                        // Invalid command found
index 91676a07c74dc71f83d42d9971cbc79c539305d1..db8991ee82fdb2575da3bd6aa210f5bda02efe8c 100644 (file)
@@ -8,6 +8,7 @@ use Org\Mxchange\CoreFramework\Controller\Controller;
 use Org\Mxchange\CoreFramework\Controller\DefaultControllerException;
 use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
@@ -163,10 +164,10 @@ abstract class BaseControllerResolver extends BaseResolver {
                // Is a action set?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($controllerName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "controllerName" is empty');
+                       throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // By default nothing shall be valid
index 8312593596bd7555bbf3295c8a8ceb6d351b5273..31ade31ed32ff33e6e5a8b413c4a3a10de7e88b2 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Controller\BaseController;
 use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
 use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
 
@@ -63,10 +64,10 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro
                // Is the variable $controllerName set and the controller is valid?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($controllerName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "controllerName" is empty');
+                       throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isControllerValid($namespace, $controllerName) === false) {
                        // Invalid controller found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
index 4b359d619c65a91b108bebeb41fff13be7376f7e..32876c9be1e27845954f55da3b47fbb9ddf02942 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Controller\BaseController;
 use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
 use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
 
@@ -63,10 +64,10 @@ class HtmlControllerResolver extends BaseControllerResolver implements Controlle
                // Are all parameter set and the controller is valid?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($controllerName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "controllerName" is empty');
+                       throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isControllerValid($namespace, $controllerName) === false) {
                        // Invalid controller found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
index a18464e0c77d271743d8cc03edb65c1700df74cd..0b0421d356226d322a87f9079dfee58a87916384 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Controller\BaseController;
 use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
 use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
 
@@ -63,10 +64,10 @@ class ImageControllerResolver extends BaseControllerResolver implements Controll
                // Are all parameter set and the controller is valid?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "namespace" is empty');
+                       throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($controllerName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "controllerName" is empty');
+                       throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isControllerValid($namespace, $controllerName) === false) {
                        // Invalid controller found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
index cb44bb8f7a4efa8c4821c39f537a70688ab5f0fd..6526f0a46aaf7d61bb730cb168d55ea847c5ccca 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Stack;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
 // Import SPL stuff
@@ -70,7 +71,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s,forceReInit=%d - CALLED!', $stackerName, intval($forceReInit)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (($forceReInit === false) && ($this->isStackInitialized($stackerName))) {
                        // Then throw the exception
                        throw new BadMethodCallException(array($this, $stackerName, $forceReInit), self::EXCEPTION_STACKER_ALREADY_INITIALIZED);
@@ -95,7 +96,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stacks()=%d,forceReInit=%d - CALLED!', count($stacks), intval($forceReInit)));
                if (count($stacks) == 0) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Array "stacks" is empty');
+                       throw new InvalidArgumentException('Array "stacks" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // "Walk" through all (more will be added as needed
@@ -121,7 +122,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Is is there?
@@ -145,7 +146,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -172,7 +173,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -199,7 +200,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -228,7 +229,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s,value[]=%s - CALLED!', $stackerName, gettype($value)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -258,7 +259,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -292,7 +293,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -323,7 +324,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
@@ -354,7 +355,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
index 4aab590ecbec7894d4929f5dbdb5bd57b1090cc7..32574ee72f306e66ac75ad5aad5b254bb88565be 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Org\Mxchange\CoreFramework\Stack;
 
+// Import framework-specific stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
 // Import SPL stuff
 use \InvalidArgumentException;
 
@@ -68,7 +71,7 @@ class FiFoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s,value[]=%s - CALLED!', $stackerName, gettype($value)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
@@ -93,7 +96,7 @@ class FiFoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get the value
@@ -123,7 +126,7 @@ class FiFoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
index ef8a7c8a0ed3dd43872d22e6c39f02ce21068de9..e5f1ce72c1e1369b57f5510dba0b93b6dafa395b 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Factory\Stack\File\FileStackIndexFactory;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
 use Org\Mxchange\CoreFramework\Filesystem\File\BinaryFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Stack\BaseStacker;
 use Org\Mxchange\CoreFramework\Traits\Index\IndexableTrait;
@@ -226,7 +227,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: fileInfoInstance[%s]=%s,type=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance, $type));
                if (empty($type)) {
                        // Invalid parameter
-                       throw new InvalidArgumentException('Parameter "type" is empty');
+                       throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get a stack file instance
@@ -318,7 +319,7 @@ abstract class BaseFileStack extends BaseStacker {
                //* PRINTR-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s,value[%s]=%s', $stackerName, gettype($value), print_r($value, true)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->isStackFull($stackerName)) {
                        // Stacker is full
                        throw new FullStackerException([$this, $stackerName, $value], self::EXCEPTION_STACKER_IS_FULL);
@@ -355,7 +356,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->isStackEmpty($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
@@ -383,7 +384,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->isStackEmpty($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
@@ -411,7 +412,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->isStackEmpty($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
@@ -435,7 +436,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($this->isStackEmpty($stackerName)) {
                        // Throw an exception
                        throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
@@ -458,7 +459,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // @TODO Please implement this, returning false
@@ -483,7 +484,7 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // So, is the stack empty?
@@ -712,13 +713,13 @@ abstract class BaseFileStack extends BaseStacker {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackName=%s,hash{}=0x%s,encoded()=%d - CALLED!', $stackName, bin2hex($hash), strlen($encoded)));
                if (empty($stackName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "stackName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($hash)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "hash" is empty');
+                       throw new InvalidArgumentException('Parameter "hash" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (empty($encoded)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "encoded" is empty');
+                       throw new InvalidArgumentException('Parameter "encoded" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Raw data been written to the file
index ab0e6928e0dd5f598790afd210062cfb8b41ae46..15723e286ea7fd829b793b2335361c8191ba8634 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Stack\File;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Filesystem\Block\CalculatableBlock;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Stack\File\BaseFileStack;
 use Org\Mxchange\CoreFramework\Stack\File\StackableFile;
@@ -59,7 +60,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: fileInfoInstance[%s]=%s,type=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance, $type));
                if (empty($type)) {
                        // No empty type
-                       throw new InvalidArgumentException('Parameter "type" is empty');
+                       throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get new instance
@@ -88,7 +89,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: stackerName=%s,value[]=%s - CALLED!', $stackerName, gettype($value)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (is_object($value) || is_resource($value)) {
                        // Those types for $value are not allowed
                        throw new InvalidArgumentException(sprintf('value[]=%s is not valid', gettype($value)));
@@ -116,7 +117,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get the value
@@ -145,7 +146,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
index 090e721b498730748baecb54dc5feb95821f692a..d27c1c200437451c85595b44d5f666b2ef7612d8 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Org\Mxchange\CoreFramework\Stack;
 
+// Import framework-specific stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
 /**
  * A FiLo Stacker class
  *
@@ -67,7 +70,7 @@ class FiLoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILO-FILE-STACK: stackerName=%s,value[]=%s - CALLED!', $stackerName, gettype($value)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
@@ -92,7 +95,7 @@ class FiLoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILO-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get the value
@@ -122,7 +125,7 @@ class FiLoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILO-FILE-STACK: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
index c8b2e19991d4430afd38c0fcfd70d4cb70a98b21..6e54173760e2d9064e55834dbd8d57b7c0650913 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
@@ -1112,7 +1113,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                // Validate parameter
                if (empty($variableName)) {
                        // Throw an exception
-                       throw new InvalidArgumentException('Parameter "variableName" is empty');
+                       throw new InvalidArgumentException('Parameter "variableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Replace all dashes to underscores to match variables with configuration entries
index 6175b9c72178746b36d234e70050a2bfa4335e9b..f2be3e21e48c57e66ea8cdc9e91253104b065071 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine\Xml;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
@@ -256,7 +257,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-XML-TEMPLATE-ENGINE: key=%s - CALLED!', $key));
                if (empty($key)) {
                        // Throw exception
-                       throw new InvalidArgumentException('Parameter key is empty');
+                       throw new InvalidArgumentException('Parameter key is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Read the variable
index a390e2ff2d2a4cc6bdef32d277c5cb829d049c1e..5d33e69c43c3c338e4129363e2f45898c081a794 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
 use Org\Mxchange\CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
 
@@ -94,7 +95,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                // Validate parameter
                if (empty($host)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "host" is empty');
+                       throw new InvalidArgumentException('Parameter "host" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($port < 1) {
                        // Throw IAE
                        throw new InvalidArgumentException(sprintf('port=%d is not valid', $port));
@@ -155,7 +156,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                // Validate parameter
                if (empty($rawData)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "rawData" is empty');
+                       throw new InvalidArgumentException('Parameter "rawData" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Default is invalid
@@ -214,7 +215,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                // Validate parameter
                if (empty($hostname)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "hostname" is empty');
+                       throw new InvalidArgumentException('Parameter "hostname" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (self::$quietResolver !== TRUE) {
                        // Debug message
                        self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Host name to resolve is: %s',
index 3ac7c9efd5ffc80443a86e0e59c72d6479b7f167..8a4992ae44e28cca7071c3adb81211bcc240a361 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\User\Guest;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Manager\Guest\ManageableGuest;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Request\Requestable;
@@ -91,7 +92,7 @@ class Guest extends BaseUser implements ManageableGuest, Registerable {
                // Check parameter
                if (empty($userName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Paramter "userName" is empty');
+                       throw new InvalidArgumentException('Paramter "userName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get a new instance
@@ -124,7 +125,7 @@ class Guest extends BaseUser implements ManageableGuest, Registerable {
                // Check parameter
                if (empty($email)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Paramter "email" is empty');
+                       throw new InvalidArgumentException('Paramter "email" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get a new instance
index 4c6ce760d58ae4bca5a3b19e57a29fdf88b569e6..295f38ab487fe2d526e30bf490126df9dbee3d62 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\User\Login;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Manager\Login\ManageableMember;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\User\BaseUser;
@@ -61,7 +62,7 @@ class Member extends BaseUser implements ManageableMember, Registerable {
                // Check parameter
                if (empty($userName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "userName" is empty');
+                       throw new InvalidArgumentException('Parameter "userName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get a new instance
@@ -94,7 +95,7 @@ class Member extends BaseUser implements ManageableMember, Registerable {
                // Check parameter
                if (empty($email)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "email" is empty');
+                       throw new InvalidArgumentException('Parameter "email" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get a new instance
index bb28ff037ca55126e388948306a7e5993c90b326..56447d988b02d960508af7391f1496706cdeb3e6 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Utils\Arrays;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
 // Import SPL stuff
@@ -56,10 +57,10 @@ final class ArrayUtils extends BaseFrameworkSystem {
                // Validate parameters
                if (count($numericArray) == 0) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Array "numericArray" is empty');
+                       throw new InvalidArgumentException('Array "numericArray" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (count($mapping) == 0) {
                        // Throw it again
-                       throw new InvalidArgumentException('Array "mapping" is empty');
+                       throw new InvalidArgumentException('Array "mapping" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (count($numericArray) != count($mapping)) {
                        // Throw it yet again
                        throw new InvalidArgumentException(sprintf('numericArray()=%d does not match mapping()=%d', count($numericArray), count($mapping)));
index 5db28e4a3e005ee030d032034faaef4d43afa5bc..5aa5510598833206bbf315f984090c4617dfabec 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Utils\Crypto;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
 // Import SPL stuff
@@ -82,7 +83,7 @@ final class CryptoUtils extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRYPTO-UTILS: str=%s - CALLED!', $str));
                if (empty($str)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "str" is empty');
+                       throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!extension_loaded('hash')) {
                        // Should be there
                        throw new LogicException('Extension ext-hash not loaded');
index 8f48bf9d85c60662103b3500ab71e41aa448237b..d75ba40107809f6752de09000a396630973a9c53 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Utils\Strings;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Configuration\FrameworkConfiguration;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
@@ -153,7 +154,7 @@ final class StringUtils extends BaseFrameworkSystem {
                // Validate parameter
                if (empty($str)) {
                        // Entry is empty
-                       throw new InvalidArgumentException('Parameter "str" is empty');
+                       throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Convert them all
@@ -202,7 +203,7 @@ final class StringUtils extends BaseFrameworkSystem {
                //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STRING-UTILS: str=%s - CALLED!', $str));
                if (empty($str)) {
                        // No empty strings, please
-                       throw new InvalidArgumentException('Parameter "str" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+                       throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!isset(self::$cache[$str])) {
                        // Init class name
                        $className = '';
index a4eca6b3c53e536315a946cd194e7e10af506277..70e15b0ed9ed04592b2071e45e3a95893953caaf 100644 (file)
@@ -27,6 +27,9 @@ namespace Org\Mxchange\CoreFramework\Generic;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface FrameworkInterface {
+       // Exception constants
+       const EXCEPTION_INVALID_ARGUMENT = 0x200;
+
        /**
         * Getter for field name
         *
index 020d13d2156fa819bc3cd32e641364f3c98d4699..1f99803dce2bd766570020a3aab1b527a6b225a7 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Connector\Database\DatabaseConnector;
 use Org\Mxchange\CoreFramework\Criteria\Criteria;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\Database\Backend\DatabaseBackend;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Middleware\BaseMiddleware;
 use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
@@ -153,7 +154,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
                // Validate parameter
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Connect to the database
@@ -215,7 +216,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
                // Validate parameter
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Connect to the database
@@ -257,7 +258,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
                // Validate parameter
                if (empty($tableName)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "tableName" is empty');
+                       throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Connect to the database
index 256b11caafe771166eedb4bb7609360f3be28faf..beb881cfc4eb2eacbc8b8297d3bb95e6c26807c2 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Tests\Resolver\Command;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Command\BaseCommandResolver;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 
@@ -61,7 +62,7 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command
                // Is the variable $commandName set and the command is valid?
                if (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+                       throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isCommandValid('Org\Mxchange\CoreFramework\Tests\Command', $commandName) === false) {
                        // Invalid command found
                        throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
index 2076757521985c1050965d8ccd86fe09c1af1703..f49e367893897650547fbc31e58d4e9540ac9efb 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Tests\Resolver\Controller;
 use Org\Mxchange\CoreFramework\Controller\BaseController;
 use Org\Mxchange\CoreFramework\Controller\Controller;
 use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
 use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
 
@@ -63,7 +64,7 @@ class TestsConsoleControllerResolver extends BaseControllerResolver implements C
                // Is the variable $controllerName set and the command is valid?
                if (empty($controllerName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "controllerName" is empty');
+                       throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isControllerValid('Org\Mxchange\CoreFramework\Tests\Controller', $controllerName) === false) {
                        // Invalid command found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);