1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-29 09:42:06 +01:00

Improve logging of parsing errors

This commit is contained in:
Florian Schmaus 2015-05-07 22:40:38 +02:00
parent 65dd6c9777
commit 236dfb009d
2 changed files with 5 additions and 2 deletions

View file

@ -576,7 +576,9 @@ public class PacketParserUtils {
try {
PacketParserUtils.addExtensionElement(presence, parser, elementName, namespace);
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to parse extension packet in Presence packet.", e);
LOGGER.log(Level.WARNING,
"Failed to parse extension packet in Presence packet. Attributes: from="
+ presence.getFrom() + " id=" + presence.getStanzaId(), e);
}
break;
}

View file

@ -51,7 +51,8 @@ public class CapsExtensionProvider extends ExtensionElementProvider<CapsExtensio
if (hash != null && version != null && node != null) {
return new CapsExtension(node, version, hash);
} else {
throw new SmackException("Caps elment with missing attributes");
throw new SmackException("Caps elment with missing attributes. Attributes: hash=" + hash + " version="
+ version + " node=" + node);
}
}