Created
September 23, 2012 20:03
-
-
Save jarek-przygodzki/3772881 to your computer and use it in GitHub Desktop.
Base class for checked exceptions that does not fill in a stack trace of the current thread.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Base class for checked exceptions that does not fill in a stack trace of the | |
* current thread. | |
*/ | |
@SuppressWarnings("serial") | |
public class StacklessException extends Exception { | |
public StacklessException() { | |
super(); | |
} | |
public StacklessException(String message) { | |
super(message); | |
} | |
public StacklessException(Throwable cause) { | |
super(cause); | |
} | |
public StacklessException(String message, Throwable cause) { | |
super(message, cause); | |
} | |
/** | |
* Does not fill execution stack trace of the current thread | |
* | |
* @return a reference to this {@code Throwable} instance. | |
* @see java.lang.Throwable#printStackTrace() | |
*/ | |
@Override | |
public Throwable fillInStackTrace() { | |
return this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment