X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fresolver%2Faction%2Fclass_BaseActionResolver.php;h=908ae59007c431e8b2586e4825be9fdd2b646f0b;hp=bec3e14bbbdf62c477bba2d741de0e70da83cb51;hb=67f34799fe805b8a01cd56f64d12813a37195ee1;hpb=63f5632b0c5d2cebf8dd0940fdab561f86470f80 diff --git a/framework/main/classes/resolver/action/class_BaseActionResolver.php b/framework/main/classes/resolver/action/class_BaseActionResolver.php index bec3e14b..908ae590 100644 --- a/framework/main/classes/resolver/action/class_BaseActionResolver.php +++ b/framework/main/classes/resolver/action/class_BaseActionResolver.php @@ -4,9 +4,11 @@ namespace CoreFramework\Resolver\Action; // Import framework stuff use CoreFramework\Factory\ObjectFactory; -use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Resolver\BaseResolver; +// Import SPL stuff +use \InvalidArgumentException; + /** * A generic action resolver class * @@ -71,7 +73,7 @@ class BaseActionResolver extends BaseResolver { * @param $namespace Namespace to look in * @param $actionName The default action we shall execute * @return $isValid Whether the given action is valid - * @throws EmptyVariableException Thrown if given action is not set + * @throws InvalidArgumentException Thrown if given action is not set */ public function isActionValid ($namespace, $actionName) { // By default nothing shall be valid @@ -80,11 +82,11 @@ class BaseActionResolver extends BaseResolver { // Is a action 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($actionName)) { // Then thrown an exception here - throw new EmptyVariableException(array($this, 'actionName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } // END - if + throw new InvalidArgumentException('Parameter "actionName" is empty'); + } // Create class name $className = sprintf(