forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report browser exceptions (emscripten-core#8347)
This sends clientside browser exceptions to the test runner, and logs them out. This may help debug failures on our CI, as before this an exception usually just silently hangs the test, and we need to try to reproduce it locally. Now at least we should get a stack trace.
- Loading branch information
1 parent
d1a9fc3
commit 6af55a6
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if (typeof window === 'object' && window) { | ||
window.onerror = function(e) { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', encodeURI('http://localhost:8888?exception=' + e)); | ||
xhr.send(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters