summaryrefslogtreecommitdiff
path: root/cli/runtime-header.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-07-07 10:46:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-07-07 10:46:25 +0200
commit30e436bba66673e17728e3ba3291b58dd16c1696 (patch)
treee1e35c8730294b0b5ce92b6aa5bac03e1c5ec69d /cli/runtime-header.cxx
parent9d288cf42217c724b0a78449130e0d5d72ef9fd5 (diff)
Add optional message to invalid_option exception
Diffstat (limited to 'cli/runtime-header.cxx')
-rw-r--r--cli/runtime-header.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/runtime-header.cxx b/cli/runtime-header.cxx
index e9e797a..60e90cc 100644
--- a/cli/runtime-header.cxx
+++ b/cli/runtime-header.cxx
@@ -170,7 +170,8 @@ generate_runtime_header (context& ctx)
<< "~invalid_value () throw ();"
<< endl
<< "invalid_value (const std::string& option," << endl
- << "const std::string& value);"
+ << "const std::string& value," << endl
+ << "const std::string& message = std::string ());"
<< endl
<< "const std::string&" << endl
<< "option () const;"
@@ -178,6 +179,9 @@ generate_runtime_header (context& ctx)
<< "const std::string&" << endl
<< "value () const;"
<< endl
+ << "const std::string&" << endl
+ << "message () const;"
+ << endl
<< "virtual void" << endl
<< "print (" << os_type << "&) const;"
<< endl
@@ -187,6 +191,7 @@ generate_runtime_header (context& ctx)
<< "private:" << endl
<< "std::string option_;"
<< "std::string value_;"
+ << "std::string message_;"
<< "};";
os << "class eos_reached: public exception"