Version 1 (modified by 16 years ago) ( diff ) | ,
---|
One or more general exception are needed to organise exception handling in the application.
Option 1: GeoNetworkException extends java.lang.RuntimeException This is a non checked exception.
Advantages:
- less boilerplate code
Disadvantages:
- requires well tested code
Option 2: GeoNetworkException extends java.lang.Exception This is a checked exception. Users of api's who can throw this exception need code to catch the exception.
Advantages:
- it is explicit which exceptions can be thrown
Disadvantages:
- code gets dirty with try catches
Chosen option 1: The application is well unit tested. It is important that the code remains clean.
Note:
See TracWiki
for help on using the wiki.