Generic catch rewritten in explicit
[shipsimu.git] / inc / classes / main / filter / payment / class_PaymentDiscoveryFilter.php
index 5e22439f8dde0ceabce7b5f37c502b13512b3a90..2f12e5b075662dcef24b84d740bd21c35533ade4 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