Ok, lets make them checked exceptions then. WE should probably do this 
sooner rather than later. The longer we wait the more code we are going 
to have to change to catch the exceptions.

Andrea Aime wrote:
> 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
> 
> !DSPAM:4007,48651d89207671804284693!
> 


-- 
Justin Deoliveira
The Open Planning Project
[EMAIL PROTECTED]

-------------------------------------------------------------------------
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