Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[worklets] Error handling in WorkletGlobalScope #433

Open
hoch opened this issue Jul 27, 2017 · 4 comments
Open

[worklets] Error handling in WorkletGlobalScope #433

hoch opened this issue Jul 27, 2017 · 4 comments

Comments

@hoch
Copy link

hoch commented Jul 27, 2017

The issue came up from the discussion of AudioWorkletGlobalScope.

Currently WorkletGlobalScope does not have a mechanism for error handling. Has been this discussed before?

@annevk
Copy link
Member

annevk commented Jul 28, 2017

See also whatwg/html#2611.

@cristiano-belloni
Copy link

Currently (Chrome 66), AudioWorkletNodes can specify an onprocessorerror callback, which gets an Event whenever the worklet throws.

@hoch kindly answered to my question in this issue an pointed me to this issue.

In my opinion, the most important info that error handling should extract from a worklet are those exposed by ErrorEvents: message, filename, lineno and colno are essential for automating logging (ie, failing worklets on the client reporting to an error handler logging onto a server) and online editing (ie, let the user edit a worklet and dynamically running it - which is what I'm trying to do).

Could I suggest to have an error handling mechanism taking into the necessity of passing these information back to the parent?

@hoch's preference would be

to expose ErrorEvent in the WorkletGlobalScope rather than AudioWorkletGlobalScope, but other folks might think otherwise.

which I believe it makes sense (all worklets exposing the same error handling mechanism), but I don't know the internals and / or the concerns regarding this approach.

Thanks!

@annevk
Copy link
Member

annevk commented Apr 26, 2018

I think unless someone can make a compelling case why having an error event without a way of communicating that error event anywhere is useful in worklets, this feature only makes sense for audio worklets and we should probably just add it there.

@domenic
Copy link
Contributor

domenic commented Oct 16, 2020

@hoch, my impression is that this is specified reasonably well in a Web Audio-specific way. Do you think we still need to modify the worklets spec in any way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants