Go to the documentation of this file.
69 public std::exception,
173 void exit(
const int errNo = 1);
188 Ostream&
operator<<(Ostream&,
const IOerror&);
287 void exit(
const int errNo = 1);
314 #define FatalErrorIn(functionName) \
315 ::Foam::FatalError((functionName), __FILE__, __LINE__)
319 #define FatalErrorInFunction FatalErrorIn(FUNCTION_NAME)
325 #define FatalIOErrorIn(functionName, ios) \
326 ::Foam::FatalIOError((functionName), __FILE__, __LINE__, (ios))
331 #define FatalIOErrorInFunction(ios) FatalIOErrorIn(FUNCTION_NAME, ios)
338 #define SafeFatalIOErrorIn(functionName, ios, msg) \
339 ::Foam::IOerror::SafeFatalIOError \
340 ((functionName), __FILE__, __LINE__, (ios), (msg))
346 #define SafeFatalIOErrorInFunction(ios, msg) \
347 SafeFatalIOErrorIn(FUNCTION_NAME, ios, msg)
356 #define notImplemented(functionName) \
357 FatalErrorIn(functionName) \
358 << "Not implemented" << ::Foam::abort(FatalError);
366 #define NotImplemented notImplemented(FUNCTION_NAME)
void dontThrowExceptions()
label ioEndLineNumber() const
const string & sourceFileName() const
friend Ostream & operator<<(Ostream &, const IOerror &)
void abort()
Abort : used to stop code for fatal errors.
Class to handle messaging in a simple, consistent stream-based manner.
IOerror(const string &title)
Construct from title string.
An IOstream is an abstract base class for all input/output systems; be they streams,...
label ioStartLineNumber() const
const string & functionName() const
#define SafeFatalIOErrorIn(functionName, ios, msg)
Report an error message using Foam::FatalIOError.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
const string & ioFileName() const
static void printStack(Ostream &)
Helper function to print a stack.
error(const string &title)
Construct from title 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.
virtual ~IOerror()
Destructor.
#define notImplemented(functionName)
Issue a FatalErrorIn for a function not currently implemented.
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
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.
Ostream & operator<<(Ostream &, const edgeMesh &)
#define SafeFatalIOErrorInFunction(ios, msg)
Report an error message using Foam::FatalIOError.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static void safePrintStack(std::ostream &)
Helper function to print a stack (if OpenFOAM IO not yet.
label sourceFileLineNumber_
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
label sourceFileLineNumber() const
virtual ~error()
Destructor.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
void abort()
Abort : used to stop code for fatal errors.
Output to memory buffer stream.
OStringStream * messageStreamPtr_
const string & title() const
Return the title of this error type.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
friend Ostream & operator<<(Ostream &, const error &)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to handle errors and exceptions in a simple, consistent stream-based manner.