From: Roland Häder Date: Sun, 5 Oct 2008 20:30:45 +0000 (+0000) Subject: Generic catch rewritten in explicit X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a505dfb31c8033bc75e96a78ec1fb29f54face66;p=shipsimu.git Generic catch rewritten in explicit --- diff --git a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php index 5e22439..2f12e5b 100644 --- a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php +++ b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php @@ -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