diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-07 10:46:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-07 10:46:25 +0200 |
commit | 30e436bba66673e17728e3ba3291b58dd16c1696 (patch) | |
tree | e1e35c8730294b0b5ce92b6aa5bac03e1c5ec69d /cli/options.hxx | |
parent | 9d288cf42217c724b0a78449130e0d5d72ef9fd5 (diff) |
Add optional message to invalid_option exception
Diffstat (limited to 'cli/options.hxx')
-rw-r--r-- | cli/options.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/options.hxx b/cli/options.hxx index dae58b6..dce59bd 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -153,7 +153,8 @@ namespace cli ~invalid_value () throw (); invalid_value (const std::string& option, - const std::string& value); + const std::string& value, + const std::string& message = std::string ()); const std::string& option () const; @@ -161,6 +162,9 @@ namespace cli const std::string& value () const; + const std::string& + message () const; + virtual void print (::std::ostream&) const; @@ -170,6 +174,7 @@ namespace cli private: std::string option_; std::string value_; + std::string message_; }; class eos_reached: public exception |