1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Compatible with JDK 1.2 and 1.3.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1831 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-01-28 05:49:25 +00:00 committed by mtucker
parent f5ee8e1eb1
commit b2fa523fcb
2 changed files with 42 additions and 8 deletions

View file

@ -52,9 +52,19 @@
package org.jivesoftware.smack;
import java.io.PrintStream;
import java.io.PrintWriter;
/**
* A generic exception that is thrown when an error occurs performing an
* XMPP operation.
*
* @author Matt Tucker
*/
public class XMPPException extends Exception {
private Throwable cause;
public XMPPException() {
super();
}
@ -64,10 +74,30 @@ public class XMPPException extends Exception {
}
public XMPPException(Throwable cause) {
super(cause);
super();
this.cause = cause;
}
public XMPPException(String message, Throwable cause) {
super(message, cause);
super(message);
this.cause = cause;
}
public void printStackTrace() {
super.printStackTrace();
System.err.println("Nested Exception: ");
cause.printStackTrace();
}
public void printStackTrace(PrintStream out) {
super.printStackTrace(out);
out.println("Nested Exception: ");
cause.printStackTrace(out);
}
public void printStackTrace(PrintWriter out) {
super.printStackTrace(out);
out.println("Nested Exception: ");
cause.printStackTrace(out);
}
}