Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lukas Weber
load_leveller
Commits
bf237395
Commit
bf237395
authored
Jun 26, 2019
by
Lukas Weber
Browse files
more sensible error when adding to a non-existing observable
parent
4e1e296d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/measurements.h
View file @
bf237395
...
...
@@ -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
)};
}
observables_
.
at
(
name
).
add
(
value
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment