Generic catch rewritten in explicit
authorRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 20:30:45 +0000 (20:30 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 20:30:45 +0000 (20:30 +0000)
inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php

index 5e22439..2f12e5b 100644 (file)
@@ -111,12 +111,22 @@ class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
 
                        // Remember this instance if all wents fine
                        Registry::getRegistry()->addInstance('payments', $discoveryInstance);
-               } catch (FrameworkException $e) {
+               } catch (ConfigEntryNotFoundException $e) {
                        // Something bad happend
                        $requestInstance->requestIsValid(false);
 
                        // Add a message to the response
-                       $responseInstance->addFatalMessage('payment_error');
+                       $responseInstance->addFatalMessage('payment_config_entry_error');
+                       $responseInstance->addFatalMessagePlain($e->getMessage());
+
+                       // Abort here
+                       return false;
+               } catch (ClassNotFoundException $e) {
+                       // Something bad happend
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('payment_class_error');
                        $responseInstance->addFatalMessagePlain($e->getMessage());
 
                        // Abort here