Skip to content

Commit

Permalink
Improve error message on rr text parse failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ibauersachs committed Jan 19, 2020
1 parent dadf761 commit 500df98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/xbill/DNS/Record.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ public static Record fromString(
rec.rdataFromString(st, origin);
t = st.get();
if (t.type != Tokenizer.EOL && t.type != Tokenizer.EOF) {
throw st.exception("unexpected tokens at end of record");
throw st.exception(
"unexpected tokens at end of record (wanted EOL/EOF, got " + t.toString() + ")");
}
return rec;
}
Expand Down

0 comments on commit 500df98

Please sign in to comment.