A performed action now always requires an action class
[shipsimu.git] / inc / classes / main / commands / web / class_WebLoginAreaCommand.php
index 3149a25d9f88930caedf713ffcf64fbba9049031..98f76cd104db292415ac67d0358bd206958f0886 100644 (file)
@@ -142,7 +142,7 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
        }
 
        /**
-        * Adds extra filters to the given controller instance
+        * Adds extra filters to the given controller instance. An corresponding action class must now exist!
         *
         * @param       $controllerInstance             A controller instance
         * @param       $requestInstance                An instance of a class with an Requestable interface
@@ -179,22 +179,17 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
                // Get application instance
                $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
 
-               // Try to get an action resolver for the given action
-               try {
-                       // Get a resolver
-                       $actionResolver = WebActionResolver::createWebActionResolver($this->actionName, $applicationInstance);
+               // Get a resolver
+               $actionResolver = WebActionResolver::createWebActionResolver($this->actionName, $applicationInstance);
 
-                       // Resolve the action
-                       $actionInstance = $actionResolver->resolveAction();
+               // Resolve the action
+               $actionInstance = $actionResolver->resolveAction();
 
-                       // Add more action-specific filters
-                       $actionInstance->addExtraFilters($controllerInstance, $requestInstance);
+               // Add more action-specific filters
+               $actionInstance->addExtraFilters($controllerInstance, $requestInstance);
 
-                       // Remember this action in registry
-                       Registry::getRegistry()->addInstance('action', $actionInstance);
-               } catch (InvalidActionException $e) {
-                       // Silently ignored because no special action was found
-               }
+               // Remember this action in registry
+               Registry::getRegistry()->addInstance('action', $actionInstance);
        }
 }