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/runtime-source.cxx | |
parent | 9d288cf42217c724b0a78449130e0d5d72ef9fd5 (diff) |
Add optional message to invalid_option exception
Diffstat (limited to 'cli/runtime-source.cxx')
-rw-r--r-- | cli/runtime-source.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/runtime-source.cxx b/cli/runtime-source.cxx index fedcbe1..d704386 100644 --- a/cli/runtime-source.cxx +++ b/cli/runtime-source.cxx @@ -109,6 +109,9 @@ generate_runtime_source (context& ctx, bool complete) << "os << \"invalid value '\" << value ().c_str () << \"' for " << "option '\"" << endl << " << option ().c_str () << \"'\";" + << endl + << "if (!message ().empty ())" << endl + << "os << \": \" << message ().c_str ();" << "}" << "const char* invalid_value::" << endl |