fix(config): reject channel properties of the wrong type

- ptree::get(key, default) returns the default also for a value that
  does not convert, so a typo (e.g. sndBufSize=big) silently gave the
  default value
- Use the default only for a missing key; throw ParserError with the
  key and the value for a value of the wrong type
- Rethrow parser errors in the config plugin: before, the device
  logged the error and continued without its channel configuration
- Enable JSONParser and SuboptParser RejectsValuesOfTheWrongType
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-04 20:31:06 +00:00
committed by Dennis Klein
parent 442b203d0d
commit b70595cebe
9 changed files with 73 additions and 55 deletions

View File

@@ -44,7 +44,8 @@ Config::Config(const string& name, Plugin::Version version, const string& mainta
LOG(info) << "fair::mq::plugins::Config: no channels configuration provided via --mq-config or --channel-config";
}
} catch (exception& e) {
LOG(error) << e.what();
LOG(error) << "Invalid channel configuration: " << e.what();
throw;
}
} else {
LOG(warn) << "No device ID or config-key provided for the configuration parser.";