]> git.mxchange.org Git - core.git/blobdiff - framework/loader/class_ClassLoader.php
Continued:
[core.git] / framework / loader / class_ClassLoader.php
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__);