[geotk] code for parsing WMS Capabilities docs

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Thu May 20 04:02:42 EDT 2010


Le 19/05/10 22:46, johann sorel a écrit :

>> 2. Some exception that shows that the XML response can't be parsed.
>> java.text.ParseException may be OK, but requires an integer offset
>> showing which character caused the problem, which may be hard to find.
>> Following Bloch's guidelines of "throw Exceptions appropriate to the
>> abstraction" I suggest creating your own checked exception type
>> "CapabilitiesParseException" or similar that wraps whatever the
>> underlying exception is.

> A capabilitiesParseException would be a bit to specific I believe.
> (...snip...)
> I do not wish to add a new exception for a unique query type.
> A more general XMLParseException would be better and reusable in much
> more places.

It seems to me that we have an enum somewhere which said which service 
(including its version) was queried. Maybe this enum can be included in the 
exception?

     Martin


More information about the Geotoolkit mailing list