76 public std::exception,
82 void exiting(
const int errNo,
const bool isAbort);
99 void simpleExit(
const int errNo,
const bool isAbort);
127 static
bool master(const label communicator = -1);
140 static
bool warnAboutAge(const
char* what, const
int version);
177 bool throwing(
const bool on)
noexcept
247 void exit(
const int errNo = 1);
254 virtual void write(
Ostream&
os,
const bool withTitle =
true)
const;
287 label ioStartLineNumber_;
288 label ioEndLineNumber_;
294 void exiting(
const int errNo,
const bool isAbort);
323 return ioStartLineNumber_;
329 return ioEndLineNumber_;
375 const std::string& where,
385 const std::string& where,
409 void exit(
const int errNo = 1);
415 virtual void write(
Ostream&
os,
const bool withTitle =
true)
const;
449#define FatalErrorIn(functionName) \
450 ::Foam::FatalError((functionName), __FILE__, __LINE__)
454#define FatalErrorInFunction FatalErrorIn(FUNCTION_NAME)
458#define FatalErrorInLookup(lookupTag, lookupName, lookupTable) \
459 ::Foam::FatalError(FUNCTION_NAME, __FILE__, __LINE__) \
460 << "Unknown " << (lookupTag) << " type " << (lookupName) \
461 << "\n\nValid " << (lookupTag) << " types :\n" \
462 << ((lookupTable).sortedToc()) << '\n'
468#define FatalIOErrorIn(functionName, ios) \
469 ::Foam::FatalIOError((functionName), __FILE__, __LINE__, (ios))
474#define FatalIOErrorInFunction(ios) FatalIOErrorIn(FUNCTION_NAME, ios)
479#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable) \
480 ::Foam::FatalIOError(FUNCTION_NAME, __FILE__, __LINE__, (ios)) \
481 << "Unknown " << (lookupTag) << " type " << (lookupName) \
482 << "\n\nValid " << (lookupTag) << " types :\n" \
483 << ((lookupTable).sortedToc()) << '\n'
490#define SafeFatalIOErrorIn(functionName, ios, msg) \
491 ::Foam::IOerror::SafeFatalIOError \
492 ((functionName), __FILE__, __LINE__, (ios), (msg))
498#define SafeFatalIOErrorInFunction(ios, msg) \
499 SafeFatalIOErrorIn(FUNCTION_NAME, ios, msg)
508#define notImplemented(functionName) \
509 FatalErrorIn(functionName) \
510 << "Not implemented" << ::Foam::abort(FatalError);
518#define NotImplemented notImplemented(FUNCTION_NAME)
virtual ~IOerror() noexcept
Destructor.
label ioEndLineNumber() const noexcept
The currently defined IO end-line number.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
static void SafeFatalIOError(const char *functionName, const char *sourceFileName, const int sourceFileLineNumber, const IOstream &ioStream, const string &msg)
Print basic message and exit.
label ioStartLineNumber() const noexcept
The currently defined IO start-line number for output messages.
void abort()
Abort : used to stop code for fatal errors.
const string & ioFileName() const noexcept
The currently defined IO name for output messages.
An IOstream is an abstract base class for all input/output systems; be they streams,...
Generic output stream using a standard (STL) stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Class to handle errors and exceptions in a simple, consistent stream-based manner.
const string & sourceFileName() const noexcept
The currently defined source-file name for output messages.
const string & functionName() const noexcept
The currently defined function name for output messages.
bool throwExceptions(const bool on=true) noexcept
Specify exception throwing state (default is on)
static void printStack(Ostream &os)
Helper function to print a stack.
OSstream & stream()
Return OSstream for output operations.
label sourceFileLineNumber_
bool dontThrowExceptions() noexcept
Deactivate exception throwing.
string message() const
The accumulated error message.
std::unique_ptr< OStringStream > messageStreamPtr_
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
void simpleExit(const int errNo, const bool isAbort)
Exit or abort, without throwing or job control handling.
static bool warnAboutAge(const int version) noexcept
Test if an age warning should be emitted.
static void safePrintStack(std::ostream &os)
static bool useAbort()
True if FOAM_ABORT is on.
void abort()
Abort : used to stop code for fatal errors.
OSstream & operator()()
Explicit convert to OSstream for << operations.
virtual ~error() noexcept
Destructor.
void clear() const
Clear any messages.
bool throwing() const noexcept
Return the current exception throwing state (on or off)
label sourceFileLineNumber() const noexcept
The currently defined source-file line number for output messages.
static bool master(const label communicator=-1)
Handle output messages in a simple, consistent stream-based manner.
const string & title() const noexcept
The title of this error type.
#define notImplemented(functionName)
Issue a FatalErrorIn for a function not currently implemented.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
#define SafeFatalIOErrorInFunction(ios, msg)
Report an error message using Foam::FatalIOError.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define SafeFatalIOErrorIn(functionName, ios, msg)
Report an error message using Foam::FatalIOError.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)