Created
September 23, 2012 20:02
-
-
Save jarek-przygodzki/3772877 to your computer and use it in GitHub Desktop.
Base class for unchecked 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 unchecked exceptions that does not fill in a stack trace of | |
* the current thread | |
*/ | |
@SuppressWarnings("serial") | |
public class RuntimeStacklessException extends RuntimeException { | |
public RuntimeStacklessException() { | |
super(); | |
} | |
public RuntimeStacklessException(String message) { | |
super(message); | |
} | |
public RuntimeStacklessException(Throwable cause) { | |
super(cause); | |
} | |
public RuntimeStacklessException(String message, Throwable cause) { | |
super(message, cause); | |
} | |
/** | |
* Does not fill execution stack trace of the current thread | |
* | |
* @return a reference to this <code>Throwable</code> 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