8000 [Form] fixed DateTimeToTimestampTransformer to use the proper excepti… · beenalee/symfony@f865a79 · GitHub
[go: up one dir, main page]

Skip to content

Commit f865a79

Browse files
committed
[Form] fixed DateTimeToTimestampTransformer to use the proper exception class
1 parent 0007702 commit f865a79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function reverseTransform($value)
7171

7272
return $dateTime;
7373
} catch (\Exception $e) {
74-
throw new \InvalidArgumentException('Expected a valid timestamp. ' . $e->getMessage(), 0, $e);
74+
throw new TransformationFailedException('Expected a valid timestamp. ' . $e->getMessage(), 0, $e);
7575
}
7676 }
7777
}

0 commit comments

Comments
 (0)
0