From 276c3191e2aeb45e77f4089a5298061bc13d9905 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Fri, 19 Sep 2003 07:54:34 +0000 Subject: [PATCH] Added toString method. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2093 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPException.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/XMPPException.java b/source/org/jivesoftware/smack/XMPPException.java index 7f767ab49..53b083c43 100644 --- a/source/org/jivesoftware/smack/XMPPException.java +++ b/source/org/jivesoftware/smack/XMPPException.java @@ -192,4 +192,15 @@ public class XMPPException extends Exception { wrappedThrowable.printStackTrace(out); } } -} + + public String toString() { + StringBuffer buf = new StringBuffer(); + if (wrappedThrowable != null) { + buf.append(wrappedThrowable); + } + if (error != null) { + buf.append(" -- ").append(error); + } + return buf.toString(); + } +} \ No newline at end of file