X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fgetopt.h;h=53c9ddf2f0100681099df40466e125914e5e74b3;hp=2aaceef836730aa24a966c3cfaa20bb9864e23a7;hb=9c6c946ed658abd50be9d597cb2c722592d660ae;hpb=87edba02a23b1338934e36fac407966b25fcf811 diff --git a/source/core/getopt.h b/source/core/getopt.h index 2aaceef..53c9ddf 100644 --- a/source/core/getopt.h +++ b/source/core/getopt.h @@ -122,16 +122,7 @@ private: virtual void store() { } virtual void store(const std::string &a) - { - try - { - data = lexical_cast(a); - } - catch(const lexical_error &e) - { - throw usage_error("Invalid argument for --"+lng+" ("+e.what()+")"); - } - } + { data = lexical_cast(a); } }; template @@ -147,16 +138,7 @@ private: virtual void store() { } virtual void store(const std::string &a) - { - try - { - data.push_back(lexical_cast(a)); - } - catch(const lexical_error &e) - { - throw usage_error("Invalid argument for --"+lng+" ("+e.what()+")"); - } - } + { data.push_back(lexical_cast(a)); } }; bool help;