W3C home > Mailing lists > Public > public-geolocation@w3.org > October 2008

Re: synchronous error handling.

From: Aaron Boodman <aa@google.com>
Date: Fri, 24 Oct 2008 11:17:27 -0700
Message-ID: <278fd46c0810241117w278d8141ue883d0d5a6fa34e6@mail.gmail.com>
To: "Doug Turner" <doug.turner@gmail.com>
Cc: public-geolocation <public-geolocation@w3.org>

On Fri, Oct 24, 2008 at 11:03 AM, Doug Turner <doug.turner@gmail.com> wrote:
>
> I think we need a bit of clarification regarding when the
> PositionErrorCallback may be called.  when a developer calls watchPosition()
> and passes a PositionErrorCallback, when is it permissible to use the error
> callback to report errors?
>
> for example, if we detect an error while processing watchPosition(), can we
> immediately call out to the PositionErrorCallback?  Or is the expectation,
> that watchPosition() will return before PositionErrorCallback is invoked?

My .02 is that if the error is incorrectly configured options object,
or some other programmer error calling the API, the API should throw
synchronously. Other errors, even if they can be detected immediately,
should always use PositionErrorCallback asynchronously.

- a
Received on Friday, 24 October 2008 18:18:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:50:52 UTC