If an option was given no value, throw an error
The previous behavior was to trigger a confusing assertion.
This commit is contained in:
parent
7fb55eedef
commit
5290b6e8aa
1 changed files with 2 additions and 1 deletions
|
|
@ -106,7 +106,8 @@ public:
|
||||||
|
|
||||||
string& str() {
|
string& str() {
|
||||||
assert(handled);
|
assert(handled);
|
||||||
assert(value);
|
if (! value)
|
||||||
|
throw_(std::runtime_error, "No argument provided for " << desc());
|
||||||
return value.as_string_lval();
|
return value.as_string_lval();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue