mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +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:
parent
f5ee8e1eb1
commit
b2fa523fcb
2 changed files with 42 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue