Re: Which Exception should be raised when multiple codes are possible

>So, as a conclusion, it is possible to raise any one of the exceptions
>that apply, and DOM implementors can choose the one that is easiest to
>implement.

As far as what's actually said in the REC goes.. yes, I believe that's
true.

I think there are strong expectations that the "most appropriate"
DOMException  will be chosen.  Generally DOM code shouldn't be throwing
exceptions unless the caller did something wrong, and you want to give them
the clearest information you can so they can fix their code.

Which is most appropriate in every possible case is not  perfectly nailed
down.  The DOM test cases (now under develoment) may help to focus this
more precisely.
.
______________________________________
Joe Kesselman  / IBM Research

Received on Monday, 5 November 2001 09:28:57 UTC