How to throw again IOException in java? [duplicate]
问题 This question already has answers here : how to throw an IOException? (7 answers) Closed 6 years ago . Code: catch (IOException e) { LOGGER.error("IOException exception happened"); //now need throw again the same exception to be //catched in the upper method } But when I try simply: catch (IOException e) { LOGGER.error("IOException exception happened"); //now need throw again the same exception to be //catched in the upper method throw e; } Eclipse supposes to me put "throw e" in try catch