All filters rewritten to throw FilterChainException
[core.git] / inc / classes / main / filter / payment / class_PaymentDiscoveryFilter.php
index 2439cb5..38891e5 100644 (file)
@@ -95,6 +95,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @todo        0% done
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @todo        0% done
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Try to get real discovery class
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Try to get real discovery class
@@ -116,7 +117,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
                        $responseInstance->addFatalMessagePlain($e->getMessage());
 
                        // Abort here
                        $responseInstance->addFatalMessagePlain($e->getMessage());
 
                        // Abort here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } catch (ClassNotFoundException $e) {
                        // Something bad happend
                        $requestInstance->requestIsValid(false);
                } catch (ClassNotFoundException $e) {
                        // Something bad happend
                        $requestInstance->requestIsValid(false);
@@ -126,7 +127,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
                        $responseInstance->addFatalMessagePlain($e->getMessage());
 
                        // Abort here
                        $responseInstance->addFatalMessagePlain($e->getMessage());
 
                        // Abort here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                }
        }
 }
                }
        }
 }