Adds unhandledrejection, that catches all unhandled promise rejection and logs them in callstats.
This commit is contained in:
parent
6a74296d3e
commit
1f98fbb99f
|
@ -320,6 +320,16 @@ export default {
|
|||
if(oldOnErrorHandler)
|
||||
oldOnErrorHandler(message, source, lineno, colno, error);
|
||||
};
|
||||
|
||||
var oldOnUnhandledRejection = window.onunhandledrejection;
|
||||
window.onunhandledrejection = function(event) {
|
||||
|
||||
JitsiMeetJS.getGlobalOnErrorHandler(
|
||||
null, null, null, null, event.reason);
|
||||
|
||||
if(oldOnUnhandledRejection)
|
||||
oldOnUnhandledRejection(event);
|
||||
};
|
||||
}
|
||||
|
||||
return JitsiMeetJS.init(config).then(() => {
|
||||
|
|
Loading…
Reference in New Issue