mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
change of error style
This commit is contained in:
parent
e0647e4696
commit
e06057dfd5
1 changed files with 8 additions and 10 deletions
|
@ -239,6 +239,8 @@ public:
|
|||
"sync", &syncDft,
|
||||
"signalIndex", &jsonChannelList
|
||||
);
|
||||
if (ret)
|
||||
throw ConfigError(cfg, err, "node-config-hook-dft");
|
||||
|
||||
if (jsonChannelList != nullptr) {
|
||||
if (jsonChannelList->type == JSON_ARRAY) {
|
||||
|
@ -296,18 +298,14 @@ public:
|
|||
paddingType = paddingTypeEnum::ZERO;
|
||||
}
|
||||
|
||||
if (endFreqency < 0 || endFreqency > sampleRate) {
|
||||
error("End frequency must be smaller than sampleRate (%i)",sampleRate);
|
||||
ret = 1;
|
||||
}
|
||||
if (endFreqency < 0 || endFreqency > sampleRate)
|
||||
throw ConfigError(cfg, err, "node-config-hook-dft","End frequency must be smaller than sampleRate {}",sampleRate);
|
||||
|
||||
if (frequencyResolution > ((double)sampleRate/windowSize))
|
||||
throw ConfigError(cfg, err, "node-config-hook-dft","The maximum frequency resolution with smaple_rate:{} and window_site:{} is {}",sampleRate, windowSize, ((double)sampleRate/windowSize));
|
||||
|
||||
|
||||
if (frequencyResolution > ((double)sampleRate/windowSize)) {
|
||||
error("The maximum frequency resolution with smaple_rate:%i and window_site:%i is %f",sampleRate, windowSize, ((double)sampleRate/windowSize));
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
throw ConfigError(cfg, err, "node-config-hook-dft");
|
||||
}
|
||||
|
||||
virtual Hook::Reason process(sample *smp)
|
||||
|
|
Loading…
Add table
Reference in a new issue