38 ioFileName_(
"unknown"),
39 ioStartLineNumber_(-1),
47 ioFileName_(errDict.
lookup(
"ioFileName")),
48 ioStartLineNumber_(errDict.
lookup<
label>(
"ioStartLineNumber")),
49 ioEndLineNumber_(errDict.
lookup<
label>(
"ioEndLineNumber"))
90 ioStream.lineNumber(),
110 dict.startLineNumber(),
131 sourceFileLineNumber,
139 <<
"--> FOAM FATAL IO ERROR:" <<
std::endl 142 <<
"file: " << ioStream.
name()
143 <<
" at line " << ioStream.
lineNumber() <<
'.' 145 <<
" From function " << functionName
147 <<
" in file " << sourceFileName
148 <<
" at line " << sourceFileLineNumber <<
'.' 160 errDict.
add(
"type",
word(
"Foam::IOerror"));
186 <<
"\nFOAM parallel run exiting\n" <<
endl;
199 throw errorException;
204 <<
"\nFOAM exiting\n" <<
endl;
222 <<
"\nFOAM aborting (FOAM_ABORT set)\n" <<
endl;
230 <<
"\nFOAM parallel run aborting\n" <<
endl;
244 throw errorException;
249 <<
"\nFOAM aborting\n" <<
endl;
280 <<
" From function " << ioErr.
functionName().c_str() << endl
static void printStack(Ostream &)
Helper function to print a stack.
virtual ~IOerror()
Destructor.
IOerror(const string &title)
Construct from title string.
bool remove(const word &)
Remove an entry specified by keyword.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
stressControl lookup("compactNormalStress") >> compactNormalStress
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.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
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 &)
OStringStream * messageStreamPtr_
label sourceFileLineNumber() const