Files
i2p.i2p/core/java/src/net/i2p/I2PException.java

50 lines
1.2 KiB
Java
Raw Normal View History

2004-04-08 04:48:39 +00:00
package net.i2p;
2004-04-08 04:48:39 +00:00
/*
* free (adj.): unencumbered; not under the control of others
* Written by jrandom in 2003 and released into the public domain
* with no warranty of any kind, either expressed or implied.
* It probably won't make your computer catch on fire, or eat
* your children, but it might. Use at your own risk.
*
*/
import java.io.PrintStream;
import java.io.PrintWriter;
/**
* Base class of I2P exceptions
*
* @author jrandom
*/
public class I2PException extends Exception {
private Throwable _source;
2004-04-08 04:48:39 +00:00
public I2PException() {
this(null, null);
}
2004-04-08 04:48:39 +00:00
public I2PException(String msg) {
this(msg, null);
}
2004-04-08 04:48:39 +00:00
public I2PException(String msg, Throwable source) {
super(msg);
_source = source;
}
2004-04-08 04:48:39 +00:00
public void printStackTrace() {
if (_source != null) _source.printStackTrace();
2004-04-08 04:48:39 +00:00
super.printStackTrace();
}
2004-04-08 04:48:39 +00:00
public void printStackTrace(PrintStream ps) {
if (_source != null) _source.printStackTrace(ps);
super.printStackTrace(ps);
2004-04-08 04:48:39 +00:00
}
2004-04-08 04:48:39 +00:00
public void printStackTrace(PrintWriter pw) {
if (_source != null) _source.printStackTrace(pw);
super.printStackTrace(pw);
2004-04-08 04:48:39 +00:00
}
}