dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
command.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup exceptions.
[command.git]
/
include
/
exception
/
missingOptionValue.h
diff --git
a/include/exception/missingOptionValue.h
b/include/exception/missingOptionValue.h
index c3050054b4e1810f395e70e10beffcc027ab633d..15d9313d97bed76c192347bca708b8ba4da65202 100644
(file)
--- a/
include/exception/missingOptionValue.h
+++ b/
include/exception/missingOptionValue.h
@@
-7,21
+7,17
@@
namespace command {
/**
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 {
*/
class MissingOptionValue : public std::invalid_argument {
-private:
- std::string message;
public:
public:
+ /** \inheritdoc */
explicit MissingOptionValue(const std::string& what_arg) :
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) :
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) { }
};
}
};
}