Re: [Bug 11348] New: [IndexedDB] Overhaul of the event model

On Mon, Feb 14, 2011 at 12:41 PM, Simon Pieters <simonp@opera.com> wrote:
> On Mon, 14 Feb 2011 19:59:37 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
>
>> In many of these cases other things than programming errors are likely
>> the cause of the error. In most of what you are listing network errors
>> are likely the most common source of errors.
>
> Yeah. (I got the list by searching for "named error" in the spec, which
> matched a bunch of stuff that fires error events, but the list is very
> likely not exhaustive.)
>
>
>> Note again that the IndexedDB errors we are talking about here are
>> semantically very similar to exceptions. The only reason we're not
>> making them exceptions is that we can't since exceptions would require
>> synchronous IO. So I would argue that consistency with exceptions is
>> more important that consistency with much of what you list above.
>
> OK.
>
>
>> That said, maybe we should fire window.onerror for many of the things
>> that you list above.
>
> Could you file a bug to that effect?

I filed two bugs, one for workers in particular, and a general one for
investigating making window.onerror more useful.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12067
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12068

>> I'll repeat my question which you left
>> unanswered:
>>
>> What is the use case for window.onerror that you had in mind which
>> would require that we *don't* fire window.onerror for IndexedDB
>> errors?
>
> No use case for not doing it. I'm fine with doing it if there's a use case
> that warrants doing it, and we can keep the platform consistent with errors
> elsewhere.

I think the usecase for window.onerror is a choke point for catching
errors that arise in the page. At the very least programming errors.
The choke point can be used to report back the error to the server as
an error logging mechanism. It can possibly also be used for reporting
errors directly to the user in the case the user is also the website
author. However it seems like developer tools support that usecase
better today.

/ Jonas

Received on Monday, 14 February 2011 22:40:47 UTC