Changes between Version 3 and Version 4 of GeoNetworkException
- Timestamp:
- 12/01/08 10:22:32 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GeoNetworkException
v3 v4 1 1 One or more general exception are needed to organise exception handling in the application. 2 2 3 '''Option 1:''' GeoNetworkException extends java.lang. RuntimeException3 '''Option 1:''' GeoNetworkException extends java.lang.!RuntimeException 4 4 This is a non checked exception. 5 5 * Advantage: less boilerplate code … … 17 17 18 18 For now only one exception is implemented (org.geonetwork.domain.ebxml.exception.GeoNetworkException). We can add and diversify more of course. 19 20 Heikki: -1. When was option 1 chosen and by whom ?? In my opinion throwing !RuntimeExceptions as a default strategy for exception handling does not make any sense. Also I do not think that try-catch blocks 'dirty' the code. Throwing !RuntimeException is a bit like avoiding strong typing by using ony java.lang.Object as prameter type; or like the current practice in GeoNetwork not to model an object domain, but do everything with JDOM Elements. Also what will we do if a !RuntimeException occurs: let the JVM exit?? I think not; this means we'll catch them somewhere in any case. 21