[whatwg] Error propagation in child workers

Ian Hickson ian at hixie.ch
Tue Dec 23 15:51:11 PST 2008

On Tue, 23 Dec 2008, Jonas Sicking wrote:
> >
> > I ended up using a combination of both the event mechanism and the old 
> > Window.onerror mechanism. The spec now says to fire onerror in the 
> > worker global scope, using the old mechanism, and if that doesn't 
> > handle the error then a series of events going up the chain to the 
> > browsing context is fired until one is canceled.
> What is the advantage of this? Seems like this is just re-inventing 
> try-catch. (yes, the same question can be posed for window.onerror, but 
> at least there there are legacy reasons).

Having the error be first reported outside of the context that created the 
error seems really weird. window.onerror is a very widely used feature, I 
don't see why it wouldn't be equally widely used in workers.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list