Commit ce0b8982 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #297 from tevans/OF-949

OF-949: Catch parsing errors for offline messages
parents a7cd832a dc91f193
...@@ -206,8 +206,13 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene ...@@ -206,8 +206,13 @@ public class OfflineMessageStore extends BasicModule implements UserEventListene
if (matcher.find()) { if (matcher.find()) {
msgXML = matcher.replaceAll(""); msgXML = matcher.replaceAll("");
} }
try {
message = new OfflineMessage(creationDate, message = new OfflineMessage(creationDate,
xmlReader.read(new StringReader(msgXML)).getRootElement()); xmlReader.read(new StringReader(msgXML)).getRootElement());
} catch (DocumentException de) {
Log.error("Failed to route packet (offline message): " + msgXML, de);
continue; // skip and process remaining offline messages
}
} }
// if there is already a delay stamp, we shouldn't add another. // if there is already a delay stamp, we shouldn't add another.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment