mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-25 20:18:00 +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() {
|
||||
StringBuilder sb = new StringBuilder("XMPPError: ");
|
||||
sb.append(condition.toString()).append(" - ").append(type.toString());
|
||||
|
||||
String descriptiveText = getDescriptiveText();
|
||||
if (descriptiveText != null) {
|
||||
sb.append(" [").append(descriptiveText).append(']');
|
||||
}
|
||||
|
||||
if (errorGenerator != null) {
|
||||
sb.append(". Generated by ").append(errorGenerator);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue