Changes between Version 1 and Version 2 of GeoNetworkException


Ignore:
Timestamp:
Nov 13, 2008, 8:25:43 AM (16 years ago)
Author:
erikvaningen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GeoNetworkException

    v1 v2  
    11One or more general exception are needed to organise exception handling in the application.
    2 
    32
    43'''Option 1:''' GeoNetworkException extends java.lang.RuntimeException
    54This is a non checked exception.
     5 * Advantage: less boilerplate code
     6 * Disadvantages: requires well tested code
    67
    7 Advantages:
    8  * less boilerplate code
    9 Disadvantages:
    10  * requires well tested code
    118
    129'''Option 2:''' GeoNetworkException extends java.lang.Exception
    1310This 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
    1413
    15 Advantages:
    16  * it is explicit which exceptions can be thrown
    17 Disadvantages:
    18  * code gets dirty with try catches
    1914
    2015'''Chosen option 1''':