39 ioFileName_(
"unknown"),
40 ioStartLineNumber_(-1),
48 ioFileName_(errDict.
lookup(
"ioFileName")),
91 ioStream.lineNumber(),
111 dict.startLineNumber(),
130 "primitiveEntry::readEntry(const dictionary&, Istream&)",
138 <<
"--> FOAM FATAL IO ERROR:" <<
std::endl 141 <<
"file: " << ioStream.
name()
142 <<
" at line " << ioStream.
lineNumber() <<
'.' 144 <<
" From function " << functionName
146 <<
" in file " << sourceFileName
147 <<
" at line " << sourceFileLineNumber <<
'.' 159 errDict.
add(
"type",
word(
"Foam::IOerror"));
185 <<
"\nFOAM parallel run exiting\n" <<
endl;
198 throw errorException;
203 <<
"\nFOAM exiting\n" <<
endl;
221 <<
"\nFOAM aborting (FOAM_ABORT set)\n" <<
endl;
229 <<
"\nFOAM parallel run aborting\n" <<
endl;
243 throw errorException;
248 <<
"\nFOAM aborting\n" <<
endl;
279 <<
" From function " << ioErr.
functionName().c_str() << endl
static bool & parRun()
Is this a parallel run?
label ioStartLineNumber() const
label sourceFileLineNumber() const
bool bad() const
Return true if stream is corrupted.
virtual ~IOerror()
Destructor.
bool remove(const word &)
Remove an entry specified by keyword.
A class for handling words, derived from string.
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)
const string & sourceFileName() const
prefixOSstream Perr(cerr,"Perr")
static void abort()
Abort program.
static void printStack(Ostream &)
Helper function to print a stack.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Ostream & operator<<(Ostream &, const edgeMesh &)
label readLabel(Istream &is)
void abort()
Abort : used to stop code for fatal errors.
OStringStream * messageStreamPtr_
static void exit(int errnum=1)
Exit program.
label ioEndLineNumber() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
const string & title() const
Return the title of this error type.
IOerror(const string &title)
Construct from title string.
void rewind()
Rewind the OStringStream.
const string & ioFileName() const
label lineNumber() const
Return current stream line number.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
virtual const fileName & name() const
Return the name of the stream.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const string & functionName() const
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.