-
Notifications
You must be signed in to change notification settings - Fork 167
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
Error reporting for addModule should be consistent with import or at least meaningful #1846
Comments
The rejected case of The Audio Worklet spec only cares about the case where module loading is successfully resolved. Perhaps I can make some clarification on that part, but the error reporting (with meaningful message) is implementation detail. I will follow up at crbug.com. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I completely agree. Thanks for raising the issue - we are aware of the lack of proper error handling/reporting, and I believe that's a fixable problem. But it's something we need to discuss at crbug.com (or bugzilla when FF ships Audio Worklet) because the spec does not mandate what kind of error message needs to be printed out. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Duplicate of https://github.com/WebAudio/web-audio-api-v2/issues/29 in V2 |
This comment was marked as off-topic.
This comment was marked as off-topic.
@guest271314 the behavior of |
This comment was marked as off-topic.
This comment was marked as off-topic.
The behavior of the Other specifications may define how additional methods behave. |
Describe the issue
It is not clear how errors derived from
.addModule()
are reported.If errors do occur the error and message should be meaningful and related to the cause of the error.
Where Is It
https://webaudio.github.io/web-audio-api/#AudioWorklet-Sequence
The specification does not state what should occur if the
Promise
is rejected.Additional Information
Consider a developer/user browses Enter Audio Worklet copy/pastes and tries this code after user action, for example, a
click
event on an elementHTML
<div class="element">hello</div>
JavaScript
and names the file
"processor.js"
as the code at the linked document doeswhere the code at
/* The code in the main global scope. */
passes "processor s .js" to.addModule()
.The error message reported at Chromium 72 is a
DOMException
.If
Worklet
is modeled on module scriptthe error should be consistent with the error that
import x from "./processors"
or
import("./processors")
throws
GET https://path/to/resource.moc/processors.js net::ERR_ABORTED 404
or
Related #1282
#1581
The text was updated successfully, but these errors were encountered: