Created
July 15, 2024 13:14
-
-
Save oharsta/cfdbbe7933ead3547f9f4383f728e164 to your computer and use it in GitHub Desktop.
Suppress stack-trace in BaseException
This file contains hidden or 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
public class BaseException extends RuntimeException { | |
public BaseException(String message) { | |
super(message); | |
} | |
protected boolean suppressStackTrace() { | |
return false; | |
} | |
@Override | |
public synchronized Throwable fillInStackTrace() { | |
return this.suppressStackTrace() ? this : super.fillInStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment