// 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