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-inline.cxx | |
parent | 9d288cf42217c724b0a78449130e0d5d72ef9fd5 (diff) |
Add optional message to invalid_option exception
Diffstat (limited to 'cli/runtime-inline.cxx')
-rw-r--r-- | cli/runtime-inline.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cli/runtime-inline.cxx b/cli/runtime-inline.cxx index 4f381ea..f6b1cee 100644 --- a/cli/runtime-inline.cxx +++ b/cli/runtime-inline.cxx @@ -113,9 +113,11 @@ generate_runtime_inline (context& ctx) << inl << "invalid_value::" << endl << "invalid_value (const std::string& option," << endl - << "const std::string& value)" << endl - << ": option_ (option)," - << " value_ (value)" + << "const std::string& value," << endl + << "const std::string& message)" << endl + << ": option_ (option)," << endl + << " value_ (value)," << endl + << " message_ (message)" << "{" << "}" @@ -129,6 +131,12 @@ generate_runtime_inline (context& ctx) << "value () const" << "{" << "return value_;" + << "}" + + << inl << "const std::string& invalid_value::" << endl + << "message () const" + << "{" + << "return message_;" << "}"; if (ctx.options.generate_file_scanner ()) |