-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Uncaught exceptions thrown asynchronously are not handled by window.onerror #1030
Labels
bug
Something isn't working
Comments
capricorn86
added a commit
that referenced
this issue
Aug 30, 2023
capricorn86
added a commit
that referenced
this issue
Sep 4, 2023
capricorn86
added a commit
that referenced
this issue
Sep 4, 2023
capricorn86
added a commit
that referenced
this issue
Sep 5, 2023
capricorn86
added a commit
that referenced
this issue
Sep 5, 2023
capricorn86
added a commit
that referenced
this issue
Sep 6, 2023
capricorn86
added a commit
that referenced
this issue
Sep 6, 2023
…s errors in scripts, event listeners and timers. Adds a new package called "@happy-dom/uncaught-exception-observer". Adds a new virtual console that by default will output all log entries to a virtual console printer instead of using the global NodeJS console.
capricorn86
added a commit
that referenced
this issue
Sep 6, 2023
capricorn86
added a commit
that referenced
this issue
Sep 6, 2023
Thank you for reporting @joeframbach! 🙂 I did not realize that you reported this issue as well until now. The fix is released now. You can read more about it here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If an uncaught exception is thrown inside a
setTimeout
or other async context, thenwindow.onerror
does not handle it.To Reproduce
Execute the script:
and see the output throws
Error: oops! at evalmachine.<anonymous>:7:13
.Expected behavior
Expected to see
intercepted error: oops!
and not escape the VM.Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Device:
happy-dom 10.11.0
Additional context
Add any other context about the problem here.
https://developer.mozilla.org/en-US/docs/Web/API/Window/error_event
The text was updated successfully, but these errors were encountered: