]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/resolver/command/html/class_HtmlCommandResolver.php
Rewrite continues:
[core.git] / framework / main / classes / resolver / command / html / class_HtmlCommandResolver.php
index 2ed244b06d56092ff76fbae00e1d5d6ea26a1185..631d4153d48f5bb2d166871b37e4202c1a8f4fdd 100644 (file)
@@ -4,10 +4,12 @@ namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
 use CoreFramework\Command\InvalidCommandException;
-use CoreFramework\Generic\EmptyVariableException;
 use CoreFramework\Manager\ManageableApplication;
 use CoreFramework\Resolver\Command\CommandResolver;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A command resolver for local (non-hubbed) HTML commands
  *
@@ -55,7 +57,7 @@ class HtmlCommandResolver extends BaseCommandResolver implements CommandResolver
         * @param       $commandName                            The default command we shall execute
         * @param       $applicationInstance            An instance of a manageable application helper class
         * @return      $resolverInstance                       The prepared command resolver instance
-        * @throws      EmptyVariableException          Thrown if default command is not set
+        * @throws      InvalidArgumentException        Thrown if default command is not set
         * @throws      InvalidCommandException         Thrown if default command is invalid
         */
        public static final function createHtmlCommandResolver ($commandName, ManageableApplication $applicationInstance) {
@@ -65,7 +67,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 EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                       throw new InvalidArgumentException('Parameter "commandName" is empty');
                } elseif ($resolverInstance->isCommandValid($commandName) === false) {
                        // Invalid command found
                        throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);