Skip to content

Instantly share code, notes, and snippets.

@rayjcwu
Created January 20, 2014 07:02
Show Gist options
  • Save rayjcwu/8516124 to your computer and use it in GitHub Desktop.
Save rayjcwu/8516124 to your computer and use it in GitHub Desktop.
Your manager has dictated that you log all exceptions in an effort to diagnose some problems with a daily process. What statement is true about this effort to comply? 1. Except for the logged message, all the information about the original exception is lost. 2. One cannot throw an exception from within a catch block. 3. The catch specification o…
void dailyProcessingSetup() {
try {
...
} catch (Exception e) {
log(e.getMessage());
throw new RuntimeException("exception logged in dailyProcessingSetup");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment