Justin Deoliveira ha scritto:
> <snip>
>>
>> Works for me, but how do we deal with code that wants to throw a 
>> safeguard exception in the last else? The usual "there is a programing
>> error, I don't know what this thing is" kind of exception.
> Good point, never thought of that. However, everything in Catalog is 
> more or less a "closed set" with the exception of StoreInfo and 
> ResourceInfo. And for those if we really wanted we could have the 
> ResourceInfoImpl.accept() and StoreInfoImpl.accept() methods throw the 
> "unknown type" exception.

Any option that avoids a hunt down in the code for such an obvious
problem is welcomed. Code telling you what you did wrong makes
development and maintenance much easier (too bad contract
based programming did not get mainstream).

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to