diff --git a/src/option_types.hh b/src/option_types.hh index 9151cd1c..5e7d8397 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -141,7 +141,9 @@ void option_from_string(StringView str, std::tuple& opt) { auto elems = split(str, tuple_separator, '\\'); if (elems.size() != sizeof...(Types)) - throw runtime_error("not enough elements in tuple"); + throw runtime_error(elems.size() < sizeof...(Types) ? + "not enough elements in tuple" + : "to many elements in tuple"); TupleOptionDetail::from_string(elems, opt); }