summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-05-29 12:55:06 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-05-29 12:55:06 (GMT)
commit5129d90b45f0862cd44ccf2904ae72d37c6fa0f1 (patch)
tree9c9687b4a0407603d1a4276e756ee9f5a74fd8de /src/com
parentaa03065dc96ac967d662362b9e506c5bb741386a (diff)
downloadstroke-5129d90b45f0862cd44ccf2904ae72d37c6fa0f1.zip
stroke-5129d90b45f0862cd44ccf2904ae72d37c6fa0f1.tar.bz2
Don't throw exceptions for receiving illegal XML
Diffstat (limited to 'src/com')
-rw-r--r--src/com/isode/stroke/parser/AaltoXMLParser.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/isode/stroke/parser/AaltoXMLParser.java b/src/com/isode/stroke/parser/AaltoXMLParser.java
index 041dc1e..52fabea 100644
--- a/src/com/isode/stroke/parser/AaltoXMLParser.java
+++ b/src/com/isode/stroke/parser/AaltoXMLParser.java
@@ -47,6 +47,7 @@ class AaltoXMLParser extends XMLParser {
inputFeeder.feedInput(xmlBytes, 0, xmlBytes.length);
} catch (XMLStreamException ex) {
error = true;
+ /* This is an unexpected error */
throw new IllegalStateException(ex);
}
@@ -75,7 +76,7 @@ class AaltoXMLParser extends XMLParser {
}
} catch (XMLStreamException e) {
error = true;
- throw new IllegalStateException(e);
+ /* This type of error (illegal XML) is ~expected */
}
if (type == XMLStreamConstants.END_DOCUMENT) {
try {