You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Safely reports errors to the `errorHandler` provided.
143
+
* Errors that occur inside `errorHandler` are notified in a new task.
144
+
* Inspired by [rxjs reportUnhandledError](https://github.com/ReactiveX/rxjs/blob/6fafcf53dc9e557439b25debaeadfd224b245a66/src/internal/util/reportUnhandledError.ts)
145
+
* @param errorHandler
146
+
* @param errorToNotify
147
+
*/
148
+
constsafelyNotifyError=(
149
+
errorHandler: ListenerErrorHandler,
150
+
errorToNotify: unknown
151
+
): void=>{
152
+
try{
153
+
errorHandler(errorToNotify)
154
+
}catch(errorHandlerError){
155
+
// We cannot let an error raised here block the listener queue.
156
+
// The error raised here will be picked up by `window.onerror`, `process.on('error')` etc...
0 commit comments