Addressed remaining review comments

This commit is contained in:
Cooldude2606 committed 2024-03-08 22:00:38 +00:00
1 parent 8fbdb5dfab
commit 6f81216e7c
6 files changed
+33 -5

No files matched your search

+1 -1
View File
@@ -564,7 +564,7 @@ export class FactorioServer extends events.EventEmitter {
// TODO at the moment this is just a helper function, it has the potential for schema checking
handle<Event>(eventName: string, handler: (event: Event) => Promise<void>) {
this.on(eventName, (event) => handler(event).catch(err => {
this.on(`ipc-${eventName}`, (event) => handler(event).catch(err => {
this._logger.error(`Error handling ipc event:\n${err.stack}`);
}));
}