[Form] Use proper transformation exception in case of failure
This commit is contained in:
parent
f29ddad5ba
commit
d11b7baa7e
@ -81,7 +81,7 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer
|
|||||||
|
|
||||||
return $dateTime;
|
return $dateTime;
|
||||||
} catch (\Exception $e) {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user