You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When conversion fails, java-time.api wraps the java.time.format.DateTimeParseException in clojure.lang.ExceptionInfo, which I cannot distinguish from any other exception when trying to catch:
(import '(java.time.format DateTimeParseException))
(try
(t/zoned-date-time"2024-04-08T00:00:00")
(catch DateTimeParseException _
(println"CAUGHT")))
java.time.format.DateTimeParseException: Text '2024-04-08T00:00:00' could not be parsed at index 19
clojure.lang.ExceptionInfo: Conversion failed
It would be convenient if java-time.api would throw with some form of :type key in the map that I could catch with e.g. https://github.com/gfredericks/catch-data, or if it would pass through the original Java exceptions.
The text was updated successfully, but these errors were encountered:
When conversion fails,
java-time.api
wraps thejava.time.format.DateTimeParseException
inclojure.lang.ExceptionInfo
, which I cannot distinguish from any other exception when trying to catch:It would be convenient if
java-time.api
would throw with some form of:type
key in the map that I could catch with e.g. https://github.com/gfredericks/catch-data, or if it would pass through the original Java exceptions.The text was updated successfully, but these errors were encountered: