W3C home > Mailing lists > Public > www-svg@w3.org > August 2004

Re: WG clarification request for SVG_WRONG_TYPE_ERR

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 07 Aug 2004 15:19:00 -0500
Message-ID: <41153934.4070607@mit.edu>
To: Dean Jackson <dean@w3.org>, www-svg@w3.org

Dean Jackson wrote:
> I agree that this causes problems, but it isn't limited to SVG.
> What does Mozilla do for the Core DOM API?

At the moment, we throw an exception if an attempt to use the object fails.  In 
some cases (eg appendChild) this is pretty immediate (since the object probably 
doesn't expose the internal interfaces needed for managing child lists).  In 
other cases, (say the node filter argument of createTreeWalker) the exception 
could be delayed until an attempt to actually use the filter object is made.

> My suggestion was to throw the error when you know you really
> don't have something of the right type.

That makes sense to me.

-Boris
Received on Saturday, 7 August 2004 20:19:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:53 UTC