diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-01-22 13:10:21 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-01-22 13:10:21 +0000 |
| commit | 2516c16bb9b35db18661ab180a41b0e157addefb (patch) | |
| tree | 7a9ea457993675bf6fc7fe77ce4373100088e192 /src | |
| parent | d737929b9e833f76a2b5e967ee60352b830e146b (diff) | |
Fix error message in tuple option parsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/option_types.hh | 4 |
1 files changed, 3 insertions, 1 deletions
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<Types...>& 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<sizeof...(Types)-1, Types...>::from_string(elems, opt); } |
