Created
April 18, 2019 01:52
-
-
Save hylowaker/bb5c2f901deb9665c1c2c2e97848b6e5 to your computer and use it in GitHub Desktop.
Java tunneling exception through runtime exception
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
class ExceptionRuntimeException extends RuntimeException { | |
ExceptionRuntimeException(Exception e) { | |
exception = e; | |
} | |
void rethrowException() throws Exception { | |
throw e; | |
} | |
/* ...etc... */ | |
Exception e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment