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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user