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.cxx | |
parent | 9d288cf42217c724b0a78449130e0d5d72ef9fd5 (diff) |
Add optional message to invalid_option exception
Diffstat (limited to 'cli/options.cxx')
-rw-r--r-- | cli/options.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/options.cxx b/cli/options.cxx index b64c26a..809b588 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -91,6 +91,9 @@ namespace cli { os << "invalid value '" << value ().c_str () << "' for option '" << option ().c_str () << "'"; + + if (!message ().empty ()) + os << ": " << message ().c_str (); } const char* invalid_value:: |