From 2516c16bb9b35db18661ab180a41b0e157addefb Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 22 Jan 2015 13:10:21 +0000 Subject: [PATCH] Fix error message in tuple option parsing --- src/option_types.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }