Re: synchronous error handling.

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