Skip to content

Commit

Permalink
Fix MissingFormatArgumentException in DataArray#getOffsetDateTime (#2564
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Almighty-Satan committed Oct 13, 2023
1 parent 7dc3368 commit 7c75fe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/dv8tion/jda/api/utils/data/DataArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ public OffsetDateTime getOffsetDateTime(int index, @Nullable OffsetDateTime defa
}
catch (DateTimeParseException e)
{
String reason = "Cannot parse value for %s into an OffsetDateTime object. Try double checking that %s is a valid ISO8601 timestamp";
throw new ParsingException(String.format(reason, e.getParsedString()));
String reason = "Cannot parse value for index %d into an OffsetDateTime object. Try double checking that %s is a valid ISO8601 timestamp";
throw new ParsingException(String.format(reason, index, e.getParsedString()));
}
return value == null ? defaultValue : value;
}
Expand Down

0 comments on commit 7c75fe4

Please sign in to comment.