- From: Jonas Sicking <jonas@sicking.cc>
- Date: Tue, 26 Apr 2011 20:18:04 -0700
- To: Israel Hilerio <israelh@microsoft.com>, Cameron McCormack <cam@mcc.id.au>
- Cc: "public-webapps@w3.org" <public-webapps@w3.org>, Victor Ngo <vicngo@microsoft.com>
On Tue, Apr 26, 2011 at 6:57 PM, Israel Hilerio <israelh@microsoft.com> wrote: > Did you come up with a conclusion on how to handle null violations: > * Bug 9653 [1] - How to handle nullable violations is not specified. > I looked for previous threads and couldn't find anything. > > It seems to me we should throw a NON_TRANSIENT_ERR when a developer uses a null value on a non-nullable parameter. What do you think? Which functions in particular are you referring to? I never really understood the relevant bug as it didn't mention which functions it's about. However in general I think we should reuse WebIDL as much as possible. It used to define a extended attribute [NoNull] which you could specify on an argument and would indicate that the function should throw if a null value was passed. This is useful for for example the second argument in the Node.insertBefore function. However it appears that that extended attribute is not present in newer versions of the WebIDL spec. Cameron, is this something that is planned to be brought back? It seems like a useful feature to avoid having to define in prose this rather common requirement. We should also define which exception should be thrown if such a [NoNull] requirement was violated. / Jonas
Received on Wednesday, 27 April 2011 03:19:01 UTC