mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
Dev/multi id ignored in config (#1115)
* warn that the multi id is ignored in config file? or throw? * throw and not just warn with printouts as that could be silent as well * throw for any multi id command in the file.
This commit is contained in:
parent
ce8911de10
commit
964ab19b42
@ -99,6 +99,12 @@ void Detector::loadParameters(const std::vector<std::string> ¶meters) {
|
||||
CmdParser parser;
|
||||
for (const auto ¤t_line : parameters) {
|
||||
parser.Parse(current_line);
|
||||
if (parser.multi_id() != 0) {
|
||||
throw RuntimeError(
|
||||
"Multi-detector indices [" + std::to_string(parser.multi_id()) +
|
||||
"] are not allowed in the file. Instead, use the index for "
|
||||
"'config' or 'parameters' command?");
|
||||
}
|
||||
caller.call(parser.command(), parser.arguments(), parser.detector_id(),
|
||||
defs::PUT_ACTION, std::cout, parser.receiver_id());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user