Skip to content

Instantly share code, notes, and snippets.

@hylowaker
Created April 18, 2019 01:52
Show Gist options
  • Select an option

  • Save hylowaker/bb5c2f901deb9665c1c2c2e97848b6e5 to your computer and use it in GitHub Desktop.

Select an option

Save hylowaker/bb5c2f901deb9665c1c2c2e97848b6e5 to your computer and use it in GitHub Desktop.
Java tunneling exception through runtime exception
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