MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / findInStanza

Method findInStanza

src/main/java/xmpp/XmppError.java:199–205  ·  view source on GitHub ↗
(JabberDataBlock stanza)

Source from the content-addressed store, hash-verified

197 }
198
199 public static XmppError findInStanza(JabberDataBlock stanza) {
200 XmppError err = decodeStanzaError(stanza.getChildBlock("error"));
201 // pytransports sends error description in body block
202 String body = stanza.getChildBlockText("body");
203 if (body != null) err.text += "\n" + body;
204 return err;
205 }
206
207 public static XmppError decodeStanzaError(JabberDataBlock error) {
208 if (!error.getTagName().equals("error")) throw new IllegalArgumentException();

Callers 8

blockArrivedMethod · 0.95
blockArrivedMethod · 0.95
blockArrivedMethod · 0.95
blockArrivedMethod · 0.95
blockArrivedMethod · 0.95
blockArrivedMethod · 0.95
dispathchMethod · 0.95
processErrorMethod · 0.95

Calls 3

decodeStanzaErrorMethod · 0.95
getChildBlockMethod · 0.80
getChildBlockTextMethod · 0.80

Tested by

no test coverage detected