Cleanup exceptions.
[command.git] / include / exception / missingOptionValue.h
index c3050054b4e1810f395e70e10beffcc027ab633d..15d9313d97bed76c192347bca708b8ba4da65202 100644 (file)
@@ -7,21 +7,17 @@
 namespace command {
 
 /**
- * Helper template class used for releasing resources.
+ * Exception thrown used when Option should have value, but no one has been set
  */
 class MissingOptionValue : public std::invalid_argument {
-private:
-    std::string message;
 public:
+    /** \inheritdoc */
     explicit MissingOptionValue(const std::string& what_arg) :
-        std::invalid_argument(what_arg), message(what_arg) { }
+        std::invalid_argument(what_arg) { }
 
+    /** \inheritdoc */
     explicit MissingOptionValue(const char* what_arg) :
-        std::invalid_argument(what_arg), message(what_arg) { }
-
-    virtual const char* what() const throw() {
-        return message.c_str();
-    }
+        std::invalid_argument(what_arg) { }
 };
 
 }