Skip to content

Commit

Permalink
update error to use cause
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Nov 8, 2023
1 parent 8b8357e commit 54d5404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/AttendanceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class AttendanceCommand implements ICommand {
await append(inviteTargets, bsInviteTargets, await auditorium.getId(), auditorium.roomId, bs.roomId, doAppend);
}
catch (error) {
throw new Error(`Error calculating invite acceptance in auditorium ${auditorium}: ${error.toString()}`)
throw new Error(`Error calculating invite acceptance in auditorium ${auditorium}`, {cause: error})
}
}
for (const spiRoom of this.conference.storedInterestRooms) {
Expand All @@ -103,7 +103,7 @@ export class AttendanceCommand implements ICommand {
await append(inviteTargets, null, await spiRoom.getId(), spiRoom.roomId, null, doAppend);
}
catch (error) {
throw new Error(`Error calculating invite acceptance in special interest room ${spiRoom}: ${error.toString()}`)
throw new Error(`Error calculating invite acceptance in special interest room ${spiRoom}`, {cause:error})
}
}
html += "</ul>";
Expand Down

0 comments on commit 54d5404

Please sign in to comment.