Better toString() method.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2095 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-09-19 15:28:53 +00:00 committed by mtucker
parent 7f6f5a07a6
commit f8d3c5f4b5
1 changed files with 6 additions and 4 deletions

View File

@ -195,12 +195,14 @@ public class XMPPException extends Exception {
public String toString() {
StringBuffer buf = new StringBuffer();
if (wrappedThrowable != null) {
buf.append(wrappedThrowable);
}
buf.append(super.toString());
if (error != null) {
buf.append(" -- ").append(error);
buf.append(": ").append(error);
}
if (wrappedThrowable != null) {
buf.append("\n -- caused by: ").append(wrappedThrowable);
}
return buf.toString();
}
}