Public Member Functions | Private Attributes | Friends
errorManip Class Reference

Error stream manipulators for exit and abort which may terminate the program or throw an exception depending if the exception handling has been switched on (off by default). More...

Public Member Functions

 errorManip (void(Err::*fPtr)(), Err &t)
 

Private Attributes

void(Err::* fPtr_ )()
 
Err & err_
 

Friends

Ostreamoperator (Ostream &os, errorManip< Err > m)
 

Detailed Description

Error stream manipulators for exit and abort which may terminate the program or throw an exception depending if the exception handling has been switched on (off by default).

Usage
error << "message1" << "message2" << FoamDataType << exit(error, errNo);
error << "message1" << "message2" << FoamDataType << abort(error);

Definition at line 50 of file errorManip.H.

Constructor & Destructor Documentation

◆ errorManip()

errorManip ( void(Err::*)()  fPtr,
Err &  t 
)
inline

Definition at line 70 of file errorManip.H.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream os,
errorManip< Err >  m 
)
friend

Field Documentation

◆ fPtr_

void(Err::* fPtr_()
private

Definition at line 65 of file errorManip.H.

Referenced by Foam::operator<<().

◆ err_

Err& err_
private

Definition at line 66 of file errorManip.H.

Referenced by Foam::operator<<().


The documentation for this class was generated from the following file:
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:131
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124