69 public std::exception,
125 throwExceptions_ =
true;
130 throwExceptions_ =
false;
148 const int sourceFileLineNumber = 0
174 void exit(
const int errNo = 1);
204 label ioStartLineNumber_;
205 label ioEndLineNumber_;
225 const string& ioFileName()
const 230 label ioStartLineNumber()
const 232 return ioStartLineNumber_;
235 label ioEndLineNumber()
const 237 return ioEndLineNumber_;
247 const string& ioFileName,
248 const label ioStartLineNumber = -1,
249 const label ioEndLineNumber = -1
274 static void SafeFatalIOError
276 const char* functionName,
277 const char* sourceFileName,
278 const int sourceFileLineNumber,
288 void exit(
const int errNo = 1);
315 #define FatalErrorIn(functionName) \ 316 ::Foam::FatalError((functionName), __FILE__, __LINE__) 320 #define FatalErrorInFunction FatalErrorIn(FUNCTION_NAME) 326 #define FatalIOErrorIn(functionName, ios) \ 327 ::Foam::FatalIOError((functionName), __FILE__, __LINE__, (ios)) 332 #define FatalIOErrorInFunction(ios) FatalIOErrorIn(FUNCTION_NAME, ios) 339 #define SafeFatalIOErrorIn(functionName, ios, msg) \ 340 ::Foam::IOerror::SafeFatalIOError \ 341 ((functionName), __FILE__, __LINE__, (ios), (msg)) 347 #define SafeFatalIOErrorInFunction(ios, msg) \ 348 SafeFatalIOErrorIn(FUNCTION_NAME, ios, msg) 357 #define notImplemented(functionName) \ 358 FatalErrorIn(functionName) \ 359 << "Not implemented" << ::Foam::abort(FatalError); 367 #define NotImplemented notImplemented(FUNCTION_NAME) static void printStack(Ostream &)
Helper function to print a stack.
virtual ~error()
Destructor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const string & title() const
Return the title of this error type.
static void safePrintStack(std::ostream &)
Helper function to print a stack (if OpenFOAM IO not yet.
Class to handle messaging in a simple, consistent stream-based manner.
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
error(const string &title)
Construct from title string.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
label sourceFileLineNumber_
void abort()
Abort : used to stop code for fatal errors.
const string & functionName() const
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OSstream & operator()()
Explicitly convert to OSstream for << operations.
friend Ostream & operator<<(Ostream &, const error &)
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
const string & sourceFileName() const
Ostream & operator<<(Ostream &, const ensightPart &)
OStringStream * messageStreamPtr_
Output to memory buffer stream.
void dontThrowExceptions()
label sourceFileLineNumber() const