9 #ifndef CT_CTEXCEPTIONS_H
10 #define CT_CTEXCEPTIONS_H
88 const char*
what()
const throw();
97 virtual std::
string getClass()
const {
return "CanteraError"; }
140 virtual std::string
getClass()
const {
return "ArraySizeError"; }
164 IndexError(std::string func, std::string arrayName,
size_t m,
size_t mmax) :
165 CanteraError(func), arrayName_(arrayName), m_(m), mmax_(mmax) {}
169 virtual std::string
getClass()
const {
return "IndexError"; }
172 std::string arrayName_;
189 void deprecatedMethod(std::string classnm, std::string oldnm, std::string newnm);
203 #define XSTR_TRACE_LINE(s) STR_TRACE_LINE(s)
206 #define STR_TRACE_LINE(s) #s
212 #define STR_TRACE (std::string(__FILE__) + ":" + XSTR_TRACE_LINE(__LINE__))
216 # define AssertTrace(expr) ((void) (0))
219 # define AssertThrow(expr, procedure) ((void) (0))
221 #ifndef AssertThrowMsg
222 # define AssertThrowMsg(expr,procedure, message) ((void) (0))
237 # define AssertTrace(expr) ((expr) ? (void) 0 : throw Cantera::CanteraError(STR_TRACE, std::string("failed assert: ") + #expr))
250 # define AssertThrow(expr, procedure) ((expr) ? (void) 0 : throw Cantera::CanteraError(procedure, std::string("failed assert: ") + #expr))
267 #ifndef AssertThrowMsg
268 # define AssertThrowMsg(expr, procedure, message) ((expr) ? (void) 0 : throw Cantera::CanteraError(procedure + std::string(": at failed assert: \"") + std::string(#expr) + std::string("\""), message))