mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
ensure errors caught by boundary are logged in calls code
This commit is contained in:
parent
bf9c868c8b
commit
3842f450dd
@ -94,6 +94,11 @@ export class GroupCall extends EventEmitter<{change: never}> {
|
||||
/** Set between calling join and leave. */
|
||||
private joinedData?: JoinedData;
|
||||
private errorBoundary = new ErrorBoundary(err => {
|
||||
if (this.joinedData) {
|
||||
// in case the error happens in code that does not log,
|
||||
// log it here to make sure it isn't swallowed
|
||||
this.joinedData.logItem.log("error at boundary").catch(err);
|
||||
}
|
||||
this.emitChange();
|
||||
});
|
||||
|
||||
|
@ -97,6 +97,11 @@ export class Member {
|
||||
private expireTimeout?: Timeout;
|
||||
private errorBoundary = new ErrorBoundary(err => {
|
||||
this.options.emitUpdate(this, "error");
|
||||
if (this.connection) {
|
||||
// in case the error happens in code that does not log,
|
||||
// log it here to make sure it isn't swallowed
|
||||
this.connection.logItem.log("error at boundary").catch(err);
|
||||
}
|
||||
});
|
||||
|
||||
constructor(
|
||||
|
Loading…
Reference in New Issue
Block a user