An error while the drake moves after the answer is logged, not thrown into the void

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CCLa2PaEeCj8njQZSWGqHx
This commit is contained in:
Eric WagonerandClaude Fable 5.1 committed 2026-10-26 17:32:04 -04:00
1 parent 2ef7682dbd
commit 9e223c5dcf
1 file changed
+7 -2
+7 -2
View File
@@ -365,8 +365,13 @@ export class Rooms<State, Input> {
setImmediate(() => { setImmediate(() => {
// A room forgotten and loaded again drives itself; this one is no longer the table. // A room forgotten and loaded again drives itself; this one is no longer the table.
if (this.rooms.get(room.id) !== room) return; if (this.rooms.get(room.id) !== room) return;
this.driveBots(room); try {
this.botsSpeak(room, 'phase'); this.driveBots(room);
this.botsSpeak(room, 'phase');
} catch (e) {
// Nothing is waiting on this callback: an error here would take the process down, so it is logged and the table left as it stands.
console.error(`${room.id}: the bots could not move: ${e instanceof Error ? e.stack ?? e.message : String(e)}`);
}
}); });
} }