// Import framework stuff
use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Generic\EmptyVariableException;
use CoreFramework\Loader\NoClassException;
// Import SPL stuff
* @param $args Arguments in an indexed array
* @return $objectInstance An instance of the requested object
* @throws NoClassException If the requested class was not found
- * @throws EmptyVariableException If a variable is empty unexpectly
- * @throws InvalidArgumentException If class name is not following naming-convention
+ * @throws InvalidArgumentException If className is empty or the name not following naming-convention
*/
public static final function createObjectByName ($className, array $args = array()) {
// First get an instance of this factory
// Is the class name valid and is the class there?
if (empty($className)) {
// Throw an exception here
- throw new EmptyVariableException(array($factoryInstance, 'className'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ throw new InvalidArgumentException('Parameter "className" is empty');
} elseif (!class_exists($className)) {
// Then throw an exception
throw new NoClassException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);