Report an I/O error. More...
#include <src/OpenFOAM/db/error/error.H>
Public Member Functions | |
IOerror (const string &title) | |
Construct from title string. | |
IOerror (const dictionary &errDict) | |
Construct from dictionary. | |
virtual | ~IOerror () throw () |
const string & | ioFileName () const |
label | ioStartLineNumber () const |
label | ioEndLineNumber () const |
OSstream & | operator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const string &ioFileName, const label ioStartLineNumber=-1, const label ioEndLineNumber=-1) |
Convert to Ostream. | |
OSstream & | operator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &) |
Convert to Ostream. | |
OSstream & | operator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const dictionary &) |
Convert to Ostream. | |
operator dictionary () const | |
Create and return a dictionary. | |
void | exit (const int errNo=1) |
Exit : can be called for any error to exit program. | |
void | abort () |
Abort : used to stop code for fatal errors. | |
![]() | |
error (const string &title) | |
Construct from title string. | |
error (const dictionary &errDict) | |
Construct from dictionary. | |
error (const error &err) | |
Construct as copy. | |
virtual | ~error () throw () |
string | message () const |
const string & | functionName () const |
const string & | sourceFileName () const |
label | sourceFileLineNumber () const |
void | throwExceptions () |
void | dontThrowExceptions () |
OSstream & | operator() (const char *functionName, const char *sourceFileName, const int sourceFileLineNumber=0) |
Convert to Ostream. | |
OSstream & | operator() (const string &functionName, const char *sourceFileName, const int sourceFileLineNumber=0) |
operator OSstream & () | |
Convert to Ostream. | |
OSstream & | operator() () |
Explicitly convert to Ostream for << operations. |
Friends | |
Ostream & | operator<< (Ostream &, const IOerror &) |
Additional Inherited Members | |
![]() | |
static void | printStack (Ostream &os) |
Helper function to print a stack. | |
![]() | |
string | functionName_ |
string | sourceFileName_ |
label | sourceFileLineNumber_ |
bool | abort_ |
bool | throwExceptions_ |
OStringStream * | messageStreamPtr_ |
IOerror | ( | const dictionary & | errDict | ) |
|
inline |
Definition at line 223 of file error.H.
Referenced by Foam::operator<<().
|
inline |
Definition at line 228 of file error.H.
Referenced by Foam::operator<<().
|
inline |
Definition at line 233 of file error.H.
Referenced by Foam::operator<<().
Foam::OSstream & operator() | ( | const char * | functionName, |
const char * | sourceFileName, | ||
const int | sourceFileLineNumber, | ||
const string & | ioFileName, | ||
const label | ioStartLineNumber = -1 , |
||
const label | ioEndLineNumber = -1 |
||
) |
Convert to Ostream.
Prints basic message and then returns Ostream for further info.
Reimplemented from messageStream.
Definition at line 58 of file IOerror.C.
References error::operator()().
Foam::OSstream & operator() | ( | const char * | functionName, |
const char * | sourceFileName, | ||
const int | sourceFileLineNumber, | ||
const IOstream & | ioStream | ||
) |
Convert to Ostream.
Prints basic message and then returns Ostream for further info.
Reimplemented from messageStream.
Foam::OSstream & operator() | ( | const char * | functionName, |
const char * | sourceFileName, | ||
const int | sourceFileLineNumber, | ||
const dictionary & | dict | ||
) |
Convert to Ostream.
Prints basic message and then returns Ostream for further info.
Reimplemented from messageStream.
operator dictionary | ( | ) | const |
Create and return a dictionary.
Reimplemented from error.
void exit | ( | const int | errNo = 1 | ) |
Exit : can be called for any error to exit program.
Reimplemented from error.
Definition at line 131 of file IOerror.C.
References Foam::abort(), dictionary::add(), JobInfo::constructed, Foam::endl(), JobInfo::exit(), Foam::exit(), Pstream::exit(), Foam::jobInfo, Pstream::parRun(), and Foam::Perr.
Referenced by Foam::exit(), Istream::operator()(), and IFstream::operator()().
void abort | ( | ) |
Abort : used to stop code for fatal errors.
Reimplemented from error.
Definition at line 172 of file IOerror.C.
References JobInfo::abort(), Foam::abort(), Pstream::abort(), dictionary::add(), JobInfo::constructed, Foam::endl(), Foam::jobInfo, Pstream::parRun(), and Foam::Perr.
Referenced by Foam::abort().