[Form] Use proper transformation exception in case of failure

This commit is contained in:
Jordi Boggiano 2011-04-26 16:01:47 +02:00
parent f29ddad5ba
commit d11b7baa7e

View File

@ -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);
}
}
}