Code sync from ship-simu code (all class config entries must end with _class!)
[mailer.git] / inc / classes / main / filter / class_FilterChain.php
index fa1f8f42112f095634f1e98c9e809012a3f5f467..7004eb50f4563d5e56639dcabdcfffcab7f20daf 100644 (file)
@@ -81,11 +81,16 @@ class FilterChain extends BaseFrameworkSystem {
                // Run all filters
                //* DEBUG */ echo "COUNT=".count($this->filters)."<br />\n";
                foreach ($this->filters as $filterInstance) {
-                       // Execute this filter
-                       //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing started.<br />\n";
+                       // Try to execute this filter
+                       try {
+                               //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing started.<br />\n";
                                $filterInstance->execute($requestInstance, $responseInstance);
-                       //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing ended.<br />\n";
-               }
+                               //* DEBUG */ echo "FILTER: ".$filterInstance->__toString().": Processing ended.<br />\n";
+                       } catch (FilterChainException $e) {
+                               // This exception can be thrown to just skip any further processing
+                               break;
+                       }
+               } // END - foreach
        }
 }