Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    (1) There are already several answers showing an example like this, so what does your answer add to the Q&A that's not already covered? Posting duplicate answers like this just adds clutter to the site. (2) The OP specifically says they don't want to do this. "Please note I do NOT want to wrap the checked exception inside a runtime exception and throw the wrapped unchecked exception instead." Commented Aug 9, 2018 at 19:09