Re: [w3c/ServiceWorker] Error handling inconsistent with other Workers (#1519)

@wanderview That wouldn't cause problems so long as they didn't bubble up to the main scope's `onerror` handler.  Mainly, I'm just trying to capture errors from an installing/activating SW when the update for it is triggered manually through the `ServiceWorkerRegistration.update()` method.  I honestly think that using the existing `ServiceWorker.onerror` handler is the easiest solution because I don't really care if the error is coming from an already activated ServiceWorker (in the particular case I'm trying to debug), and it's also, to me, the most intuitive place to look.

The problem with firing on the `ServiceWorkerGlobalScope.onerror` handler is in cases where the SW OOMs or has some other fatal error that would kill the context without allowing for the handler to either a) execute or b) complete - there's no way to actually get that data out of the SW scope to any kind of logging mechanism.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1519#issuecomment-658291825

Received on Tuesday, 14 July 2020 16:51:02 UTC