Cantera  3.1.0a1
ctexceptions.h File Reference

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

#include "ct_defs.h"
#include "cantera/base/fmt.h"
#include <exception>
Include dependency graph for ctexceptions.h:

Detailed Description

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

Definition in file 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   (string(__FILE__) + ":" + XSTR_TRACE_LINE(__LINE__))
 Provides a string variable containing the file and line number. More...
 
#define AssertTrace(expr)   ((expr) ? (void) 0 : throw CanteraError(STR_TRACE, string("failed assert: ") + #expr))
 Assertion must be true or an error is thrown. More...
 
#define AssertThrow(expr, procedure)   ((expr) ? (void) 0 : throw CanteraError(procedure, string("failed assert: ") + #expr))
 Assertion must be true or an error is thrown. More...
 
#define AssertThrowMsg(expr, procedure, ...)   ((expr) ? (void) 0 : throw CanteraError(procedure + string(":\nfailed assert: \"") + string(#expr) + string("\""), __VA_ARGS__))
 Assertion must be true or an error is thrown. More...
 
#define AssertFinite(expr, procedure, ...)   AssertThrowMsg(expr < BigNumber && expr > -BigNumber, procedure, __VA_ARGS__)
 Throw an exception if the specified exception is not a finite number. More...
 

Macro Definition Documentation

◆ XSTR_TRACE_LINE

#define XSTR_TRACE_LINE (   s)    STR_TRACE_LINE(s)

Provides a line number.

Definition at line 213 of file ctexceptions.h.

◆ STR_TRACE_LINE

#define STR_TRACE_LINE (   s)    #s

Provides a line number.

Definition at line 216 of file ctexceptions.h.

◆ STR_TRACE

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

Provides a string variable containing the file and line number.

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

Definition at line 222 of file ctexceptions.h.