32 #ifndef LSST_PEX_POLICY_EXCEPTIONS_H
33 #define LSST_PEX_POLICY_EXCEPTIONS_H
37 #define POL_EARGS_TYPED char const* ex_file, int ex_line, char const* ex_func
38 #define POL_EARGS_UNTYPED ex_file, ex_line, ex_func
39 #define POL_EXCEPT_VIRTFUNCS(etn) \
40 char const *etn::getType(void) const throw() { return #etn " *"; } \
41 lsst::pex::exceptions::Exception *etn::clone(void) const { \
42 return new etn(*this); \
58 : lsst::pex::exceptions::RuntimeError(
63 std::string(
"Illegal Policy parameter name: ") + badname)
65 virtual char const *
getType(
void)
const throw();
66 virtual lsst::pex::exceptions::Exception *
clone() const;
75 : lsst::pex::exceptions::DomainError(
80 std::string(
"Malformed dictionary: ") + msg)
82 virtual char const *
getType(
void)
const throw();
83 virtual lsst::pex::exceptions::Exception *
clone() const;
93 : lsst::pex::exceptions::NotFoundError(
98 std::string(
"Policy parameter name not found: ") + parameter)
100 virtual char const *
getType(
void)
const throw();
101 virtual lsst::pex::exceptions::Exception *
clone() const;
108 class
TypeError : public lsst::pex::exceptions::DomainError {
111 : lsst::pex::exceptions::DomainError(
115 const std::string& parameter,
const std::string& expected)
117 std::string(
"Parameter \"") + parameter +
118 "\" has wrong type; expecting " + expected +
".")
120 virtual char const *
getType(
void)
const throw();
121 virtual lsst::pex::exceptions::Exception *
clone() const;
127 #endif // LSST_PEX_POLICY_EXCEPTIONS_H
Include files required for standard LSST Exception handling.
virtual char const * getType(void) const
TypeError(char const *ex_file, int ex_line, char const *ex_func, const std::string ¶meter, const std::string &expected)
#define POL_EARGS_UNTYPED
DictionaryError(char const *ex_file, int ex_line, char const *ex_func)
BadNameError(char const *ex_file, int ex_line, char const *ex_func, const std::string &badname)
BadNameError(char const *ex_file, int ex_line, char const *ex_func)
DictionaryError(char const *ex_file, int ex_line, char const *ex_func, const std::string &msg)
NameNotFound(char const *ex_file, int ex_line, char const *ex_func)
virtual lsst::pex::exceptions::Exception * clone() const
TypeError(char const *ex_file, int ex_line, char const *ex_func)
NameNotFound(char const *ex_file, int ex_line, char const *ex_func, const std::string ¶meter)