Skip to content

Instantly share code, notes, and snippets.

@KowalczykBartek
Created March 1, 2015 20:40
Show Gist options
  • Save KowalczykBartek/2ee7f8f6024d0e704e49 to your computer and use it in GitHub Desktop.
Save KowalczykBartek/2ee7f8f6024d0e704e49 to your computer and use it in GitHub Desktop.
public void rethrowException(String exceptionName) throws Exception {
try {
if (exceptionName.equals("First")) {
throw new FirstException();
} else {
throw new SecondException();
}
} catch (Exception e) {
throw e;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment