Skip to content

Anych/catch_java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Catch'em all

  1. Handle a call to a risky method in the main method in CatchEmAll that can throw different types of exceptions.

  2. Please note that some types of exceptions should be handled, while other - wrapped and rethrown, while others - shouldn't.

Details:

What is thrown How to handle
IOException Wrap in an IllegalArgumentException with a message "Resource error" and throw it
FileNotFoundException Wrap in an IllegalArgumentException with a message "Resource is missing" and throw it
ArithmeticException or NumberFormatException Print a message of the thrown exception to System.err and do not throw anything
Any other Exceptions Should not be caught

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages