Merge pull request #327 from square/eric.0620.date-cause

Add cause to malformed date string exception.
This commit is contained in:
Jesse Wilson
2017-06-20 18:14:17 -04:00
committed by GitHub

View File

@@ -190,7 +190,7 @@ final class Iso8601Utils {
// If we get a ParseException it'll already have the right message/offset.
// Other exception types can convert here.
} catch (IndexOutOfBoundsException | IllegalArgumentException e) {
throw new JsonDataException("Not an RFC 3339 date: " + date);
throw new JsonDataException("Not an RFC 3339 date: " + date, e);
}
}