ABLATE Source Documentation  0.12.34
parameterException.hpp
1 #ifndef ABLATELIBRARY_PARAMETEREXCEPTION_HPP
2 #define ABLATELIBRARY_PARAMETEREXCEPTION_HPP
3 
4 namespace ablate::parameters {
5 
6 struct ParameterException : public std::exception {
7  private:
8  std::string message;
9 
10  public:
11  ParameterException(std::string variableName) { message = "The variable " + variableName + " cannot be found in the parameters."; }
12 
13  const char* what() const throw() override { return message.c_str(); }
14 };
15 
16 } // namespace ablate::parameters
17 #endif // ABLATELIBRARY_PARAMETEREXCEPTION_HPP
Definition: parameterException.hpp:6