| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/reportError | [Back] [Original] |
Get to know MDN better
Note: This feature is only available in Web Workers.
The reportError() method of the WorkerGlobalScope interface may be used to report errors to the console or event handlers of global scopes, emulating an uncaught JavaScript exception.
This feature is primarily intended for custom event-dispatching or callback-manipulating libraries. Libraries can use this feature to catch errors in callback code and re-throw them to the top level handler. This ensures that an exception in one callback will not prevent others from being handled, while at the same time ensuring that stack trace information is still readily available for debugging at the top level.
See window.reportError() for more information.
reportError(throwable)
None (undefined).
TypeErrorThe method is called without an error argument.
| Specification |
|---|
| HTML # runtime-script-errors |
WorkerGlobalScopeWindow.reportError()error eventerror eventerror eventThis page was last modified on Nov 19, 2025 by MDN contributors.
WorkerGlobalScopeYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |