put form in error if saving customer fails

This commit is contained in:
Manuel Raynaud
2013-07-03 10:11:40 +02:00
parent 42c41d4de1
commit ad8fa59e9a

View File

@@ -68,9 +68,11 @@ class Customer implements EventSubscriberInterface
);
} catch (\PropelException $e) {
Tlog::getInstance()->error(sprintf('error during creating customer on action/createCustomer with message "%s"', $e->getMessage()));
$event->setFormError($form);
}
echo "ok"; exit;
//Customer is create, he is automatically connected
} else {
$event->setFormError($form);