From 3217870c6462c91bbc30deec1ba3a7627a5bc367 Mon Sep 17 00:00:00 2001 From: David Tee Date: Thu, 28 Apr 2011 23:39:50 -0700 Subject: [PATCH] Form needs to throw exception when DateTime Transform fail. Added useful information to form view - original child form name (before the concatenation with parent ids).' did not match any file(s) known to git --- src/Symfony/Component/Form/Extension/Core/Type/FieldType.php | 2 ++ src/Symfony/Component/Form/Form.php | 1 + 2 files changed, 3 insertions(+) mode change 100644 => 100755 src/Symfony/Component/Form/Form.php diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FieldType.php b/src/Symfony/Component/Form/Extension/Core/Type/FieldType.php index 8515c6021b9cb..de1069ad8523b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FieldType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FieldType.php @@ -55,6 +55,7 @@ public function buildForm(FormBuilder $builder, array $options) public function buildView(FormView $view, FormInterface $form) { + $formName = $form->getName(); if ($view->hasParent()) { $parentId = $view->getParent()->get('id'); $parentName = $view->getParent()->get('name'); @@ -67,6 +68,7 @@ public function buildView(FormView $view, FormInterface $form) $view->set('form', $view); $view->set('id', $id); + $view->set('form_name', $formName); $view->set('name', $name); $view->set('errors', $form->getErrors()); $view->set('value', $form->getClientData()); diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php old mode 100644 new mode 100755 index f855650b991b2..c2b3a85819061 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -464,6 +464,7 @@ public function bind($clientData) $normData = $this->clientToNorm($clientData); $synchronized = true; } catch (TransformationFailedException $e) { + throw $e; } if ($synchronized) {