Use reject instead of throw
This ensures that the containing promise is rejected without triggering the side effects of an uncaught exception, such as causing the debugger to pause. // FREEBIE
This commit is contained in:
@@ -39305,7 +39305,7 @@ MessageReceiver.prototype = {
|
||||
ev.error = error;
|
||||
ev.proto = envelope;
|
||||
this.dispatchEvent(ev);
|
||||
throw error; // reject this promise
|
||||
return Promise.reject(error);
|
||||
}.bind(this));
|
||||
},
|
||||
handleSentMessage: function(destination, timestamp, message) {
|
||||
|
Reference in New Issue
Block a user