ctexceptions.h Source File#
ctexceptions.h
Go to the documentation of this file.
247# define AssertTrace(expr) ((expr) ? (void) 0 : throw CanteraError(STR_TRACE, string("failed assert: ") + #expr))
261# define AssertThrow(expr, procedure) ((expr) ? (void) 0 : throw CanteraError(procedure, string("failed assert: ") + #expr))
278# define AssertThrowMsg(expr, procedure, ...) ((expr) ? (void) 0 : throw CanteraError(procedure + string(":\nfailed assert: \"") + string(#expr) + string("\""), __VA_ARGS__))
286# define AssertFinite(expr, procedure, ...) AssertThrowMsg(expr < BigNumber && expr > -BigNumber, procedure, __VA_ARGS__)
ArraySizeError(const string &procedure, size_t sz, size_t reqd)
Constructor.
Definition ctexceptions.h:147
string getMessage() const override
Method overridden by derived classes to format the error message.
Definition ctexceptions.cpp:55
string getClass() const override
Method overridden by derived classes to indicate their type.
Definition ctexceptions.h:151
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
virtual string getMessage() const
Method overridden by derived classes to format the error message.
Definition ctexceptions.cpp:45
string procedure_
The name of the procedure where the exception occurred.
Definition ctexceptions.h:119
CanteraError()
Protected default constructor discourages throwing errors containing no information.
Definition ctexceptions.h:113
virtual string getMethod() const
Get the name of the method that threw the exception.
Definition ctexceptions.cpp:50
CanteraError(const string &procedure, const string &msg, const Args &... args)
Normal Constructor for the CanteraError base class.
Definition ctexceptions.h:83
virtual string getClass() const
Method overridden by derived classes to indicate their type.
Definition ctexceptions.h:106
string getMessage() const override
Method overridden by derived classes to format the error message.
Definition ctexceptions.cpp:61
IndexError(const string &func, const string &arrayName, size_t m, size_t mmax)
Constructor.
Definition ctexceptions.h:178
string getClass() const override
Method overridden by derived classes to indicate their type.
Definition ctexceptions.h:183
An error indicating that an unimplemented function has been called.
Definition ctexceptions.h:195
NotImplementedError(const string &func, const string &msg, const Args &... args)
Alternative constructor taking same arguments as CanteraError.
Definition ctexceptions.h:204
NotImplementedError(const string &func)
Definition ctexceptions.h:199
string getClass() const override
Method overridden by derived classes to indicate their type.
Definition ctexceptions.h:207
This file contains definitions of constants, types and terms that are used in internal routines and a...
Wrapper for either system-installed or local headers for fmt.
Generated by 1.9.7