diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-05-29 12:55:06 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-05-29 12:55:06 (GMT) |
commit | 5129d90b45f0862cd44ccf2904ae72d37c6fa0f1 (patch) | |
tree | 9c9687b4a0407603d1a4276e756ee9f5a74fd8de /src/com | |
parent | aa03065dc96ac967d662362b9e506c5bb741386a (diff) | |
download | stroke-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.java | 3 |
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 { |