I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit d808b999 authored by zzz's avatar zzz
Browse files

better error message

parent 603b3454
No related branches found
No related tags found
No related merge requests found
......@@ -480,12 +480,17 @@ public class DataHelper {
name.contains("=") ||
name.contains("\r") ||
name.contains("\n") ||
name.startsWith(";") ||
val.contains("#") ||
name.startsWith(";")) {
if (iae == null)
iae = new IllegalArgumentException("Invalid character (one of \"#;=\\r\\n\") in key: \"" +
name + "\" = \"" + val + '\"');
continue;
}
if (val.contains("#") ||
val.contains("\r") ||
val.contains("\n")) {
if (iae == null)
iae = new IllegalArgumentException("Invalid character (one of \"#;=\\r\\n\") in key or value: \"" +
iae = new IllegalArgumentException("Invalid character (one of \"#\\r\\n\") in value: \"" +
name + "\" = \"" + val + '\"');
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment