All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
error.H File Reference
Include dependency graph for error.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  error
 Class to handle errors and exceptions in a simple, consistent stream-based manner. More...
 
class  IOerrorLocation
 
class  IOerror
 

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define FatalErrorIn(functionName)    ::Foam::FatalError((functionName), __FILE__, __LINE__)
 Report an error message using Foam::FatalError. More...
 
#define FatalErrorInFunction   FatalErrorIn(FUNCTION_NAME)
 Report an error message using Foam::FatalError. More...
 
#define FatalIOErrorIn(functionName, ios)    ::Foam::FatalIOError((functionName), __FILE__, __LINE__, (ios))
 Report an error message using Foam::FatalIOError. More...
 
#define FatalIOErrorInFunction(ios)   FatalIOErrorIn(FUNCTION_NAME, ios)
 Report an error message using Foam::FatalIOError. More...
 
#define SafeFatalIOErrorIn(functionName, ios, msg)
 Report an error message using Foam::FatalIOError. More...
 
#define SafeFatalIOErrorInFunction(ios, msg)    SafeFatalIOErrorIn(FUNCTION_NAME, ios, msg)
 Report an error message using Foam::FatalIOError. More...
 
#define notImplemented(functionName)
 Issue a FatalErrorIn for a function not currently implemented. More...
 
#define NotImplemented   notImplemented(FUNCTION_NAME)
 Issue a FatalErrorIn for a function not currently implemented. More...
 

Functions

Ostream & operator<< (Ostream &, const error &)
 
Ostream & operator<< (Ostream &, const IOerror &)
 

Variables

error FatalError
 
IOerror FatalIOError
 
template<class... T>
constexpr bool False = false
 

Detailed Description

Original source file error.H

Definition in file error.H.

Macro Definition Documentation

◆ FatalErrorIn

#define FatalErrorIn (   functionName)     ::Foam::FatalError((functionName), __FILE__, __LINE__)

Report an error message using Foam::FatalError.

for functionName in file __FILE__ at line __LINE__

Definition at line 329 of file error.H.

◆ FatalErrorInFunction

#define FatalErrorInFunction   FatalErrorIn(FUNCTION_NAME)

Report an error message using Foam::FatalError.

for FUNCTION_NAME in file __FILE__ at line __LINE__

Definition at line 334 of file error.H.

◆ FatalIOErrorIn

#define FatalIOErrorIn (   functionName,
  ios 
)     ::Foam::FatalIOError((functionName), __FILE__, __LINE__, (ios))

Report an error message using Foam::FatalIOError.

for functionName in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 340 of file error.H.

◆ FatalIOErrorInFunction

#define FatalIOErrorInFunction (   ios)    FatalIOErrorIn(FUNCTION_NAME, ios)

Report an error message using Foam::FatalIOError.

for FUNCTION_NAME in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 346 of file error.H.

◆ SafeFatalIOErrorIn

#define SafeFatalIOErrorIn (   functionName,
  ios,
  msg 
)
Value:
((functionName), __FILE__, __LINE__, (ios), (msg))
static void SafeFatalIOError(const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &, const string &msg)
Print basic message and exit. Uses cerr if streams not constructed.
Definition: IOerror.C:101

Report an error message using Foam::FatalIOError.

(or cerr if FatalIOError not yet constructed) for functionName in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 353 of file error.H.

◆ SafeFatalIOErrorInFunction

#define SafeFatalIOErrorInFunction (   ios,
  msg 
)     SafeFatalIOErrorIn(FUNCTION_NAME, ios, msg)

Report an error message using Foam::FatalIOError.

(or cerr if FatalIOError not yet constructed) for functionName in file __FILE__ at line __LINE__ for a particular IOstream

Definition at line 361 of file error.H.

◆ notImplemented

#define notImplemented (   functionName)
Value:
FatalErrorIn(functionName) \
<< "Not implemented" << ::Foam::abort(::Foam::FatalError);
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:329
errorManip< error > abort(error &err)
Definition: errorManip.H:131
error FatalError

Issue a FatalErrorIn for a function not currently implemented.

The functionName is printed and then abort is called.

This macro can be particularly useful when methods must be defined to complete the interface of a derived class even if they should never be called for this derived class.

Definition at line 371 of file error.H.

◆ NotImplemented

#define NotImplemented   notImplemented(FUNCTION_NAME)

Issue a FatalErrorIn for a function not currently implemented.

The FUNCTION_NAME is printed and then abort is called.

This macro can be particularly useful when methods must be defined to complete the interface of a derived class even if they should never be called for this derived class.

Definition at line 381 of file error.H.