Re: Clarification on exceptions

It is clearly under-specified.  

Do you think that there is an expectation that the exceptions need to match for browser interop?

Doug


On Sep 26, 2010, at 9:33 AM, Marcos Caceres wrote:

> Hi
> I'm seeking a bit of clarification on exception handling in the CR draft of the spec.
> 
> When calling getCurrentPosition(), the spec says that the method should be aborted if certain arguments are incorrect.
> 
> However tests in the test suites expect an exception to be thrown, for example:
> 
> http://dev.w3.org/geo/api/test-suite/t?00027
> http://dev.w3.org/geo/api/test-suite/t?00028
> http://dev.w3.org/geo/api/test-suite/t?00131
> 
> Should the spec say that an exception should be thrown (or even what kind)?
> 
> I'll also note that each browser seems to throw a different kind of exception (using t?00027):
> 
> Opera:
> PASS: expected exception Error: WRONG_ARGUMENTS_ERR
> 
> Chrome:
> PASS: expected exception Error: TYPE_MISMATCH_ERR: DOM Exception 17
> 
> Firefox 4:
> PASS: expected exception [Exception... "Not enough arguments [nsIDOMGeoGeolocation.getCurrentPosition]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://dev.w3.org/geo/api/test-suite/t00027.js :: anonymous :: line 5" data: no]
> 
> Kind regards,
> Marcos
> -- 
> Marcos Caceres
> Opera Software
> 

Received on Monday, 27 September 2010 05:59:42 UTC