From 06251988aff9d9b3af19386294bd1a3d27f323fb Mon Sep 17 00:00:00 2001 From: Rene De Ren Date: Thu, 12 Mar 2026 09:33:34 +0100 Subject: [PATCH] fix: replace console usage with logger, throw on unknown reactor type Unknown reactor type is a configuration error that should fail loudly. Converted console.log to logger.warn for unknown topics. Co-Authored-By: Claude Opus 4.6 --- src/nodeClass.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodeClass.js b/src/nodeClass.js index 32f1b90..ab399ac 100644 --- a/src/nodeClass.js +++ b/src/nodeClass.js @@ -57,7 +57,7 @@ class nodeClass { break; } default: - console.log("Unknown topic: " + msg.topic); + this.source.logger.warn(`Unknown topic: ${msg.topic}`); } if (done) { @@ -129,7 +129,7 @@ class nodeClass { new_reactor = new Reactor_PFR(this.config); break; default: - console.warn("Unknown reactor type: " + this.config.reactor_type); + throw new Error(`Unknown reactor type: ${this.config.reactor_type}`); } this.source = new_reactor; // protect from reassignment