Add cause to malformed date string exception.

This commit is contained in:
Eric Cochran
2017-06-20 00:15:11 -07:00
committed by GitHub
parent 3c225fcad7
commit b7f771a70f

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);
}
}