diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/isode/stroke/parser/XMPPParser.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/isode/stroke/parser/XMPPParser.java b/src/com/isode/stroke/parser/XMPPParser.java index 516ab76..658ed9b 100644 --- a/src/com/isode/stroke/parser/XMPPParser.java +++ b/src/com/isode/stroke/parser/XMPPParser.java @@ -31,7 +31,13 @@ public class XMPPParser implements XMLParserClient { public boolean parse(String data) { parseErrorOccurred_ = false; - boolean xmlParseResult = xmlParser_.parse(data); + boolean xmlParseResult = false; + try { + xmlParseResult = xmlParser_.parse(data); + } catch (Exception e) { + parseErrorOccurred_ = true; + logger_.warning("Data " + data + " caused:\n" + e.getMessage()); + } if (parseErrorOccurred_ || !xmlParseResult) { logger_.warning(String.format("When parsing, %b and %b", parseErrorOccurred_, xmlParseResult)); } |