mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 00:19:21 +08:00
Merge pull request #327 from square/eric.0620.date-cause
Add cause to malformed date string exception.
This commit is contained in:
@@ -190,7 +190,7 @@ final class Iso8601Utils {
|
|||||||
// If we get a ParseException it'll already have the right message/offset.
|
// If we get a ParseException it'll already have the right message/offset.
|
||||||
// Other exception types can convert here.
|
// Other exception types can convert here.
|
||||||
} catch (IndexOutOfBoundsException | IllegalArgumentException e) {
|
} catch (IndexOutOfBoundsException | IllegalArgumentException e) {
|
||||||
throw new JsonDataException("Not an RFC 3339 date: " + date);
|
throw new JsonDataException("Not an RFC 3339 date: " + date, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user