From a1aec6a5bedfed0ee168944a325ee13dcafcab6d Mon Sep 17 00:00:00 2001 From: nojhan Date: Thu, 15 Mar 2012 18:16:07 +0100 Subject: [PATCH] added the declaration of the exception used by eoParser::getParam --- eo/src/eoExceptions.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/eo/src/eoExceptions.h b/eo/src/eoExceptions.h index 3b888436..0066d985 100644 --- a/eo/src/eoExceptions.h +++ b/eo/src/eoExceptions.h @@ -55,7 +55,6 @@ private: }; - /*! An error that signals that a maximum number of evaluations has been reached. @@ -80,4 +79,26 @@ private: }; +/*! + * An error that signals a missing parameter + * + * Thrown by eoParser::getParam + * + * @ingroup Parameters + */ +class eoMissingParamException : public std::exception +{ +public: + eoMissingParamException(std::string name) : _name(name){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "The command parameter " << _name << " has not been declared"; + return ss.str().c_str(); + } + +private: + std::string _name; +}; #endif // __eoExceptions_h__