Go to the documentation of this file.
53 #ifndef messageStream_H
54 #define messageStream_H
138 const string&
title() const noexcept
189 const string& functionName
197 const char* functionName,
198 const char* sourceFileName,
199 const int sourceFileLineNumber = 0
206 const string& functionName,
207 const char* sourceFileName,
208 const int sourceFileLineNumber = 0
216 const char* functionName,
217 const char* sourceFileName,
218 const int sourceFileLineNumber,
219 const string& ioFileName,
220 const label ioStartLineNumber = -1,
221 const label ioEndLineNumber = -1
229 const char* functionName,
230 const char* sourceFileName,
231 const int sourceFileLineNumber,
240 const char* functionName,
241 const char* sourceFileName,
242 const int sourceFileLineNumber,
265 extern messageStream
Info;
294 #define FUNCTION_NAME __PRETTY_FUNCTION__
296 #define FUNCTION_NAME __func__
302 #define SeriousErrorIn(functionName) \
303 ::Foam::SeriousError((functionName), __FILE__, __LINE__)
307 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
313 #define SeriousIOErrorIn(functionName, ios) \
314 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
319 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios)
324 #define WarningIn(functionName) \
325 ::Foam::Warning((functionName), __FILE__, __LINE__)
329 #define WarningInFunction WarningIn(FUNCTION_NAME)
335 #define IOWarningIn(functionName, ios) \
336 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
341 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
346 #define InfoIn(functionName) \
347 ::Foam::Info((functionName), __FILE__, __LINE__)
351 #define InfoInFunction InfoIn(FUNCTION_NAME)
354 #define PoutIn(functionName) \
355 ::Foam::Pout << (functionName) << ':'
358 #define PoutInFunction PoutIn(FUNCTION_NAME)
362 if (::Foam::infoDetailLevel > 0) Info
372 #define IOInfoIn(functionName, ios) \
373 ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
378 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
389 #define DebugInFunction \
390 if (debug) InfoInFunction
400 #define DebugPoutInFunction \
401 if (debug) PoutInFunction
405 #define DebugVar(var) \
407 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \
408 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
409 ::Foam::Pout.prefix() = oldPrefix + #var " "; \
410 ::Foam::Pout<< var << ::Foam::endl; \
411 ::Foam::Pout.prefix() = oldPrefix; \
int debug
Static debugging option.
Warning of possible problem.
#define InfoInFunction
Report an information message using Foam::Info.
#define InfoIn(functionName)
Report an information message using Foam::Info.
Handle output messages in a simple, consistent stream-based manner.
errorSeverity
Message type, error severity flags.
OSstream & masterStream(const label communicator)
static int level
The output level (verbosity) of messages.
static int redirect
The output redirection of messages.
An IOstream is an abstract base class for all input/output systems; be they streams,...
#define SeriousIOErrorIn(functionName, ios)
Report an IO error message using Foam::SeriousError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A class for handling character strings derived from std::string.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
#define SeriousErrorIn(functionName)
Report an error message using Foam::SeriousError.
#define IOWarningIn(functionName, ios)
Report an IO warning using Foam::Warning.
OSstream & stream(OSstream *alternative=nullptr)
messageStream Info
Information stream (stdout output on master, null elsewhere)
#define IOInfoIn(functionName, ios)
Report an IO information message using Foam::Info.
Generic output stream using a standard (STL) stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
int infoDetailLevel
Global for selective suppression of Info output.
#define PoutInFunction
Report using Foam::Pout with FUNCTION_NAME prefix.
messageStream SeriousError
int maxErrors() const noexcept
The maximum number of errors before program termination.
A serious problem - eg, data corruption.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
messageStream(const string &title, const errorSeverity severity, const int maxErrors=0)
Construct from components.
std::ostream & stdStream()
Return std::ostream for output operations.
General information output (stdout)
General information output (stderr)
#define DebugVar(var)
Report a variable name and value.
const string & title() const noexcept
The title of this error type.
const string & prefix() const noexcept
Return the stream prefix.