Next: try, catch, and finally
Up: Exceptions
Previous: throw
Contents
Subsections
- The exceptions a method can throw are declared with a throws clause.
- The exceptions a method can throw are as important as the value type the method returns.
- Catch the exception and handle it.
- Catch the exception and map it to one of your exceptions by throwing an exception of a type declared in your own throws clause.
- Declare the exception in your throws clause and let the exception pass through your method.
Next: try, catch, and finally
Up: Exceptions
Previous: throw
Contents