Commit bf237395 authored by Lukas Weber's avatar Lukas Weber
Browse files

more sensible error when adding to a non-existing observable

parent 4e1e296d
......@@ -32,6 +32,9 @@ private:
template<class T>
void measurements::add(const std::string name, T value) {
if(observables_.count(name) == 0) {
throw std::runtime_error{fmt::format("tried to add to observable '{}' which was not registered!", name)};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment