use CoreFramework\Controller\DefaultControllerException;
use CoreFramework\Controller\Controller;
use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\EmptyVariableException;
use CoreFramework\Registry\Registry;
use CoreFramework\Resolver\BaseResolver;
use CoreFramework\Resolver\Controller\ControllerResolver;
+// Import SPL stuff
+use \InvalidArgumentException;
+
/**
* A generic controller resolver class
*
* @param $namespace Namespace to look in, no trailing backslash
* @param $controllerName The default controller we shall execute
* @return $isValid Whether the given controller is valid
- * @throws EmptyVariableException Thrown if given controller is not set
+ * @throws InvalidArgumentException Thrown if given controller is not set
* @throws DefaultControllerException Thrown if default controller was not found
*/
protected function isControllerValid ($namespace, $controllerName) {
// Is namespace and controller 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($controllerName)) {
// Then thrown an exception here
- throw new EmptyVariableException(array($this, 'controllerName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } // END - if
+ throw new InvalidArgumentException('Parameter "controllerName" is empty');
+ }
// Create class name
$className = sprintf(