Justin Deoliveira ha scritto:
> If you look at the implementation CatalogImpl IllegalARgumentExceptions 
> are thrown when a problem occurs adding a store / resource / namespace / 
>   workspace / etc... We should probably add a throws declaration to the 
> interface.
> 
> If you think a checked exception would be better we can go that route as 
> well.

Hum, it seems to me the "Java way" is to throw checked exceptions for
every problem that's not related to a programming error. Thought I have
seen doing otherwise for Hibernate and Spring remoting, where the
throws is there, the exception is custom, but it's a runtime subclass.
The reasoning was that those are unrecoverable exceptions so you
want to just let them go to the UI and build an error message for
the user (which is what I did in the past).

For consistency with Java and GeoTools ways of doing things I
have a preference for checked excetions, but I worked the other
way without shooting myself in the foot in the past too.

Cheers
Andrea

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to