diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php index 3cb246e84d..35e2ffcc01 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php @@ -81,7 +81,7 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer return $dateTime; } catch (\Exception $e) { - throw new \InvalidArgumentException('Expected a valid date string. ' . $e->getMessage(), 0, $e); + throw new TransformationFailedException('Expected a valid date string. ' . $e->getMessage(), 0, $e); } } } \ No newline at end of file