diff options
author | Elliott Hughes <enh@google.com> | 2012-12-04 14:03:53 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-12-04 14:35:14 -0800 |
commit | cff1616012dc0d56c2da9af2b9b1183e76c7e044 (patch) | |
tree | d632e2c61724b75a4e5a7691718a2e2682922000 /xml | |
parent | ae3360773d0c6c56c256e9ecd7f2a9f3d845c4e1 (diff) | |
download | libcore-cff1616012dc0d56c2da9af2b9b1183e76c7e044.zip libcore-cff1616012dc0d56c2da9af2b9b1183e76c7e044.tar.gz libcore-cff1616012dc0d56c2da9af2b9b1183e76c7e044.tar.bz2 |
Add detail messages to all the easy IllegalArgumentException cases.
Noticed during my recent Matcher change.
Change-Id: I415d911b26d0ee548ca04d56bba7fc3d4e6b3f88
Diffstat (limited to 'xml')
-rw-r--r-- | xml/src/main/java/org/kxml2/io/KXmlParser.java | 2 | ||||
-rw-r--r-- | xml/src/main/java/org/kxml2/io/KXmlSerializer.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xml/src/main/java/org/kxml2/io/KXmlParser.java b/xml/src/main/java/org/kxml2/io/KXmlParser.java index 2be8d36..80fd8ca 100644 --- a/xml/src/main/java/org/kxml2/io/KXmlParser.java +++ b/xml/src/main/java/org/kxml2/io/KXmlParser.java @@ -1612,7 +1612,7 @@ public class KXmlParser implements XmlPullParser, Closeable { boolean detectCharset = (charset == null); if (is == null) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("is == null"); } try { diff --git a/xml/src/main/java/org/kxml2/io/KXmlSerializer.java b/xml/src/main/java/org/kxml2/io/KXmlSerializer.java index d1965d6..8fa2756 100644 --- a/xml/src/main/java/org/kxml2/io/KXmlSerializer.java +++ b/xml/src/main/java/org/kxml2/io/KXmlSerializer.java @@ -327,7 +327,7 @@ public class KXmlSerializer implements XmlSerializer { public void setOutput(OutputStream os, String encoding) throws IOException { if (os == null) - throw new IllegalArgumentException(); + throw new IllegalArgumentException("os == null"); setOutput( encoding == null ? new OutputStreamWriter(os) |