Copy over the error from inside workers to the Worker error event? #7596
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
topic: error reporting
topic: serialize and transfer
topic: workers
When an uncaught exception occurs inside a worker, it fires:
An
ErrorEvent
"inside", on theWorkerGlobalScope
object. Theevent.error
property contains the exception value.An
ErrorEvent
"outside", on theWorker
object. Theevent.error
property isnull
.(Relevant spec section)
This made sense, back before we had a way to serialize exceptions across thread boundaries. However, #4665 introduced that ability! So maybe we should consider setting the "outside"
error
property to a clone of the "inside"error
property?IMO this has a few prerequisites before I'd be fully comfortable with it:
error
event fired duringWorker
initialization, which uses (per spec at least)Event
instead ofErrorEvent
, but interop issues in this area make me nervous about adding more.The text was updated successfully, but these errors were encountered: