Skip to content

Commit

Permalink
Slightly better error message when decoding JSON strings
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Aug 16, 2021
1 parent 42c33e5 commit 572434e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/json/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public <T> T toType(String source, Type typeOfT) {
public <T> T toType(String source, Type typeOfT, PropertySetting setter) {
try (StringReader reader = new StringReader(source)) {
return toType(reader, typeOfT, setter);
} catch (JsonException e) {
throw new JsonException("Unable to parse: " + source, e);
}
}

Expand Down

0 comments on commit 572434e

Please sign in to comment.