RE: ISSUE-13: [API] Exception codes

[Moving to public list]

I agree with the desirability of exception inheritance. More in keeping
with what we're used to in OO.

I wonder a bit about the enum/extensibility argument. If we were going
to add more exceptions, then we would be rewriting (updating) the API.
So that means that we would be creating a new IDL. Which means we would
have an opportunity at that time to also extend the enum entries.

The advantage of using an enum is type safety.

The comment about extensibility [1] was made way back in 1998. I wonder
if the experience of extending the DOM since then has justified their
position, or would they have done things differently?

---Rotan


-----Original Message-----
From: member-ddwg-request@w3.org [mailto:member-ddwg-request@w3.org] On
Behalf Of Rodrigo Garcia Acevedo
Sent: 13 June 2007 15:15
To: Mobile Web Initiative Device Description Working Group WG
Subject: RE: ISSUE-13: [API] Exception codes


Hi.

The use of Exception codes instead of enum types (or different kinds of
exceptions) in other W3C specs had an explanation [1], it is easier to
add new codes for exceptions than to check for enum values. People
thought it favors extensibility.
As I am used to work with different object oriented languages I would
prefer to have exception inheritance, but it is not supported in OMG
IDL, so I think we should stick using exception codes.

Regards,
Rodrigo.

[1] http://lists.w3.org/Archives/Public/www-dom/1998JulSep/0289.html

-----Mensaje original-----
De: member-ddwg-request@w3.org [mailto:member-ddwg-request@w3.org] En
nombre de Mobile Web Initiative Device Description Working Group Issue
Tracker
Enviado el: martes, 12 de junio de 2007 11:55
Para: member-ddwg@w3.org
Asunto: ISSUE-13: [API] Exception codes



ISSUE-13: [API] Exception codes

http://www.w3.org/2005/MWI/DDWG/Group/track/issues/13

Raised by: Jose Manuel Cantera Fonseca
On product: 

Should an explicit set of values be used for Exception codes, or should
an enum type be used? 

Received on Wednesday, 13 June 2007 15:29:00 UTC