Merge remote branch 'Seldaek/datetime'
* Seldaek/datetime: [Form] Use proper transformation exception in case of failure
This commit is contained in:
commit
0007702321
@ -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