Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Enumerations | Functions
ctexceptions.h File Reference

Definitions for the classes that are thrown when Cantera experiences an error condition (also contains errorhandling module text - see Error Handling). More...

#include <exception>
#include <string>
Include dependency graph for ctexceptions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CanteraError
 Base class for exceptions thrown by Cantera classes. More...
 
class  ArraySizeError
 Array size error. More...
 
class  IndexError
 An array index is out of range. More...
 
class  NotImplementedError
 An error indicating that an unimplemented function has been called. More...
 

Namespaces

 Cantera
 Namespace for the Cantera kernel.
 

Macros

#define XSTR_TRACE_LINE(s)   STR_TRACE_LINE(s)
 Provides a line number. More...
 
#define STR_TRACE_LINE(s)   #s
 Provides a line number. More...
 
#define STR_TRACE   (std::string(__FILE__) + ":" + XSTR_TRACE_LINE(__LINE__))
 Provides a std::string variable containing the file and line number. More...
 
#define AssertTrace(expr)   ((expr) ? (void) 0 : throw Cantera::CanteraError(STR_TRACE, std::string("failed assert: ") + #expr))
 Assertion must be true or an error is thrown. More...
 
#define AssertThrow(expr, procedure)   ((expr) ? (void) 0 : throw Cantera::CanteraError(procedure, std::string("failed assert: ") + #expr))
 Assertion must be true or an error is thrown. More...
 
#define AssertThrowMsg(expr, procedure, message)   ((expr) ? (void) 0 : throw Cantera::CanteraError(procedure + std::string(": at failed assert: \"") + std::string(#expr) + std::string("\""), message))
 Assertion must be true or an error is thrown. More...
 
#define AssertFinite(expr, procedure, message)   AssertThrowMsg(expr < BigNumber && expr > -BigNumber, procedure, message)
 Throw an exception if the specified exception is not a finite number. More...
 

Enumerations

enum  CT_RealNumber_Range_Behavior {
  DONOTHING_CTRB = -1, CHANGE_OVERFLOW_CTRB, THROWON_OVERFLOW_CTRB, FENV_CHECK_CTRB,
  THROWON_OVERFLOW_DEBUGMODEONLY_CTRB
}
 Enum containing Cantera's behavior for situations where overflow or underflow of real variables may occur. More...
 

Functions

bool check_FENV_OverUnder_Flow ()
 Quick check on whether there has been an underflow or overflow condition in the floating point unit. More...
 
void clear_FENV ()
 Clear all the flags for floating-point exceptions. More...
 

Detailed Description

Definitions for the classes that are thrown when Cantera experiences an error condition (also contains errorhandling module text - see Error Handling).

Definition in file ctexceptions.h.

Macro Definition Documentation

#define XSTR_TRACE_LINE (   s)    STR_TRACE_LINE(s)

Provides a line number.

Definition at line 236 of file ctexceptions.h.

#define STR_TRACE_LINE (   s)    #s

Provides a line number.

Definition at line 239 of file ctexceptions.h.

#define STR_TRACE   (std::string(__FILE__) + ":" + XSTR_TRACE_LINE(__LINE__))

Provides a std::string variable containing the file and line number.

This is a std:string containing the file name and the line number

Definition at line 245 of file ctexceptions.h.

#define AssertFinite (   expr,
  procedure,
  message 
)    AssertThrowMsg(expr < BigNumber && expr > -BigNumber, procedure, message)

Throw an exception if the specified exception is not a finite number.

Definition at line 308 of file ctexceptions.h.

Referenced by IdealGasReactor::evalEqs(), Reactor::evalEqs(), IdealGasReactor::updateState(), and Reactor::updateState().