38 ioFileName_(
"unknown"),
39 ioStartLineNumber_(-1),
78 ioStream.lineNumber(),
98 dict.startLineNumber(),
119 sourceFileLineNumber,
127 <<
"--> FOAM FATAL IO ERROR:" <<
std::endl 130 <<
"file: " << ioStream.
name()
131 <<
" at line " << ioStream.
lineNumber() <<
'.' 133 <<
" From function " << functionName
135 <<
" in file " << sourceFileName
136 <<
" at line " << sourceFileLineNumber <<
'.' 148 errDict.
add(
"type",
word(
"Foam::IOerror"));
174 <<
"\nFOAM parallel run exiting\n" <<
endl;
187 throw errorException;
192 <<
"\nFOAM exiting\n" <<
endl;
210 <<
"\nFOAM aborting (FOAM_ABORT set)\n" <<
endl;
218 <<
"\nFOAM parallel run aborting\n" <<
endl;
232 throw errorException;
237 <<
"\nFOAM aborting\n" <<
endl;
268 <<
" From function " << ioErr.
functionName().c_str() << endl
static void printStack(Ostream &)
Helper function to print a stack.
IOerror(const string &title)
Construct from title string.
bool remove(const word &)
Remove an entry specified by keyword.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void abort()
Abort : used to stop code for fatal errors.
bool bad() const
Return true if stream is corrupted.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const string & title() const
Return the title of this error type.
label ioStartLineNumber() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
void rewind()
Rewind the OStringStream.
label lineNumber() const
Return current stream line number.
label ioEndLineNumber() const
bool add(entry *, bool mergeEntry=false)
Add a new entry.
OStringStream messageStream_
Class to handle errors and exceptions in a simple, consistent stream-based manner.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
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.
A functionName is a word starting with '#'.
A class for handling words, derived from string.
virtual const fileName & name() const
Return the name of the stream.
const string & functionName() const
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static void exit(int errnum=1)
Exit program.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
prefixOSstream Perr(cerr, "Perr")
const string & ioFileName() const
static void abort()
Abort program.
static bool & parRun()
Is this a parallel run?
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
const string & sourceFileName() const
Ostream & operator<<(Ostream &, const ensightPart &)
label sourceFileLineNumber() const