W3C home > Mailing lists > Public > public-ddwg@w3.org > November 2009

Unwanted (?) exceptions in DDR Simple API spec

From: Jo Rabin <jrabin@mtld.mobi>
Date: Wed, 25 Nov 2009 15:05:30 +0000
Message-ID: <4B0D47BA.2030402@mtld.mobi>
To: public-ddwg@w3.org
Dear Survivor of the DDWG (as Francois put it :-) )

A question I've been meaning to put to colleagues is ref the 
specification of Exceptions in the API. I've been working with a Java 
implementation for some time now and frequently end up with something 
like this:

try {
    pvv = service.getPropertyValues(evidence);
} catch (NameException e1) {
    // can't get here

for (PropertyValue pv: pvv.getAll()) {
    try {
    } catch (ValueException e) {
       // can't get here

It seems to me that there is a strong case for changing the exception 
types to avoid this unnecessary round the houses. Interestingly enough, 
though DDRException subclasses Exception in the supplied Java, it is not 
stated explicitly in the API documentation that this is the case. Would 
it be acceptable for a conforming implementation to have DDRException 
subclass SystemException, I wonder?

Received on Wednesday, 25 November 2009 15:06:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:00:16 UTC