Data Structures | Namespaces | Macros | Functions | Variables
error.H File Reference
Include dependency graph for error.H:

Go to the source code of this file.

Data Structures

class  error
 Class to handle errors and exceptions in a simple, consistent stream-based manner. More...
 
class  IOerror
 Report an I/O error. More...
 

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
 

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 313 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 318 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 324 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 330 of file error.H.

◆ SafeFatalIOErrorIn

#define SafeFatalIOErrorIn (   functionName,
  ios,
  msg 
)
Value:
((functionName), __FILE__, __LINE__, (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 337 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 345 of file error.H.

◆ notImplemented

#define notImplemented (   functionName)
Value:
FatalErrorIn(functionName) \
<< "Not implemented" << ::Foam::abort(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 355 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 365 of file error.H.

Foam::IOerror::SafeFatalIOError
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:118
Foam::FatalError
error FatalError
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:131
FatalErrorIn
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:313