]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/resolver/command/class_BaseCommandResolver.php
Rewrite continues:
[core.git] / framework / main / classes / resolver / command / class_BaseCommandResolver.php
index a6d015cc164e6c094c1068c246c22b7545ad64ef..0db8170f08a6ec9dab990b449c90cea069e020c7 100644 (file)
@@ -7,11 +7,11 @@ use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Command\Commandable;
 use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\EmptyVariableException;
 use CoreFramework\Request\Requestable;
 use CoreFramework\Resolver\BaseResolver;
 
 // Import SPL stuff
+use \InvalidArgumentException;
 use \UnexpectedValueException;
 
 /**
@@ -163,7 +163,7 @@ class BaseCommandResolver extends BaseResolver {
         * @param       $namespace              Namespace to look in
         * @param       $commandName    The default command we shall execute
         * @return      $isValid                Whether the given command is valid
-        * @throws      EmptyVariableException  Thrown if given command is not set
+        * @throws      InvalidArgumentException        Thrown if given command is not set
         */
        protected function isCommandValid ($namespace, $commandName) {
                // By default nothing shall be valid
@@ -172,10 +172,10 @@ class BaseCommandResolver extends BaseResolver {
                // Is namespace and command name set?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new EmptyVariableException(array($this, 'namespace'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                       throw new InvalidArgumentException('Parameter "namespace" is empty');
                } elseif (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new EmptyVariableException(array($this, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                       throw new InvalidArgumentException('Parameter "commandName" is empty');
                } // END - if
 
                // Create the full class name