From f8d3c5f4b504086ff8591dda9ac8c8776d6ebeac Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Fri, 19 Sep 2003 15:28:53 +0000 Subject: [PATCH] Better toString() method. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2095 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPException.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPException.java b/source/org/jivesoftware/smack/XMPPException.java index 53b083c43..2d509d6b3 100644 --- a/source/org/jivesoftware/smack/XMPPException.java +++ b/source/org/jivesoftware/smack/XMPPException.java @@ -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(); } } \ No newline at end of file