45 maxErrors_(maxErrors),
52 title_(dict.
lookup(
"title")),
63 Pout<<
"** messageStream with comm:" << communicator
81 const char* functionName,
82 const char* sourceFileName,
83 const int sourceFileLineNumber
89 <<
" From function " << functionName <<
endl 90 <<
" in file " << sourceFileName
91 <<
" at line " << sourceFileLineNumber <<
endl 100 const string& functionName,
101 const char* sourceFileName,
102 const int sourceFileLineNumber
107 functionName.c_str(),
116 const char* functionName,
117 const char* sourceFileName,
118 const int sourceFileLineNumber,
119 const string& ioFileName,
120 const label ioStartLineNumber,
121 const label ioEndLineNumber
127 <<
" From function " << functionName <<
endl 128 <<
" in file " << sourceFileName
129 <<
" at line " << sourceFileLineNumber <<
endl 130 <<
" Reading " << ioFileName;
132 if (ioStartLineNumber >= 0 && ioEndLineNumber >= 0)
134 os <<
" from line " << ioStartLineNumber
135 <<
" to line " << ioEndLineNumber;
137 else if (ioStartLineNumber >= 0)
139 os <<
" at line " << ioStartLineNumber;
150 const char* functionName,
151 const char* sourceFileName,
152 const int sourceFileLineNumber,
160 sourceFileLineNumber,
162 ioStream.lineNumber(),
170 const char* functionName,
171 const char* sourceFileName,
172 const int sourceFileLineNumber,
180 sourceFileLineNumber,
182 dict.startLineNumber(),
244 "--> FOAM Serious Error : ",
251 "--> FOAM Warning : ",
static void printStack(Ostream &)
Helper function to print a stack.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorSeverity
Severity flags.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const string & title() const
Return the title of this error type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
Class to handle messaging in a simple, consistent stream-based manner.
static label worldComm
Default communicator (all processors)
stressControl lookup("compactNormalStress") >> compactNormalStress
OFstream Snull
Global predefined null output stream "/dev/null".
messageStream SeriousError
int debugSwitch(const char *name, const int defaultValue=0)
Lookup debug switch or add default value.
OSstream Sout(cout, "Sout")
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
errorManip< error > abort(error &err)
OSstream & masterStream(const label communicator)
Convert to OSstream.
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.
prefixOSstream Pout(cout, "Pout")
messageStream(const string &title, errorSeverity, const int maxErrors=0)
Construct from components.
OSstream & operator()()
Explicitly convert to OSstream for << operations.