Changes between Version 1 and Version 2 of GeoNetworkException
- Timestamp:
- Nov 13, 2008, 8:25:43 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GeoNetworkException
v1 v2 1 1 One or more general exception are needed to organise exception handling in the application. 2 3 2 4 3 '''Option 1:''' GeoNetworkException extends java.lang.RuntimeException 5 4 This is a non checked exception. 5 * Advantage: less boilerplate code 6 * Disadvantages: requires well tested code 6 7 7 Advantages:8 * less boilerplate code9 Disadvantages:10 * requires well tested code11 8 12 9 '''Option 2:''' GeoNetworkException extends java.lang.Exception 13 10 This is a checked exception. Users of api's who can throw this exception need code to catch the exception. 11 * Advantage: it is explicit which exceptions can be thrown 12 * Disadvantages: code gets dirty with try catches 14 13 15 Advantages:16 * it is explicit which exceptions can be thrown17 Disadvantages:18 * code gets dirty with try catches19 14 20 15 '''Chosen option 1''':