mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Add descriptive text to StanzaError.toString()
This commit is contained in:
parent
5da6dea138
commit
7518bf9a25
1 changed files with 6 additions and 0 deletions
|
@ -198,6 +198,12 @@ public class StanzaError extends AbstractError implements ExtensionElement {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder("XMPPError: ");
|
StringBuilder sb = new StringBuilder("XMPPError: ");
|
||||||
sb.append(condition.toString()).append(" - ").append(type.toString());
|
sb.append(condition.toString()).append(" - ").append(type.toString());
|
||||||
|
|
||||||
|
String descriptiveText = getDescriptiveText();
|
||||||
|
if (descriptiveText != null) {
|
||||||
|
sb.append(" [").append(descriptiveText).append(']');
|
||||||
|
}
|
||||||
|
|
||||||
if (errorGenerator != null) {
|
if (errorGenerator != null) {
|
||||||
sb.append(". Generated by ").append(errorGenerator);
|
sb.append(". Generated by ").append(errorGenerator);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue