Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- ... // code that can throw IOException or some user-defined ParserException
- } catch(IOException) {
- e = new IOException(); // this is acceptable (although there is no point in doing it)
- e.printStackTrace();
- }
- try {
- ... // code that can throw IOException or some user-defined ParserException
- } catch(IOException | ParserException e) {
- e = new IOException(); // this is NOT acceptable -- e may reference a ParserException
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement