Add XMPPError.toString()

This commit is contained in:
Florian Schmaus 2015-01-21 10:02:34 +01:00
parent b265d2d2a2
commit 6a542824bc
1 changed files with 10 additions and 0 deletions

View File

@ -175,6 +175,16 @@ public class XMPPError extends AbstractError {
return conditionText;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("XMPPError: ");
sb.append(condition.toString()).append(" - ").append(type.toString());
if (errorGenerator != null) {
sb.append(". Generated by ").append(errorGenerator);
}
return sb.toString();
}
/**
* Returns the error as XML.
*