70 public std::exception,
118 throwExceptions_ =
true;
123 throwExceptions_ =
false;
141 const int sourceFileLineNumber = 0
165 void exit(
const int errNo = 1);
195 label ioStartLineNumber_;
196 label ioEndLineNumber_;
209 const string& ioFileName()
const 214 label ioStartLineNumber()
const 216 return ioStartLineNumber_;
219 label ioEndLineNumber()
const 221 return ioEndLineNumber_;
231 const string& ioFileName,
232 const label ioStartLineNumber = -1,
233 const label ioEndLineNumber = -1
258 static void SafeFatalIOError
260 const char* functionName,
261 const char* sourceFileName,
262 const int sourceFileLineNumber,
271 void exit(
const int errNo = 1);
290 template <
class...
T>
291 constexpr
bool False =
false;
302 #define FatalErrorIn(functionName) \ 303 ::Foam::FatalError((functionName), __FILE__, __LINE__) 307 #define FatalErrorInFunction FatalErrorIn(FUNCTION_NAME) 313 #define FatalIOErrorIn(functionName, ios) \ 314 ::Foam::FatalIOError((functionName), __FILE__, __LINE__, (ios)) 319 #define FatalIOErrorInFunction(ios) FatalIOErrorIn(FUNCTION_NAME, ios) 326 #define SafeFatalIOErrorIn(functionName, ios, msg) \ 327 ::Foam::IOerror::SafeFatalIOError \ 328 ((functionName), __FILE__, __LINE__, (ios), (msg)) 334 #define SafeFatalIOErrorInFunction(ios, msg) \ 335 SafeFatalIOErrorIn(FUNCTION_NAME, ios, msg) 344 #define notImplemented(functionName) \ 345 FatalErrorIn(functionName) \ 346 << "Not implemented" << ::Foam::abort(::Foam::FatalError); 354 #define NotImplemented notImplemented(FUNCTION_NAME) static void printStack(Ostream &)
Helper function to print a stack.
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.
OStringStream messageStream_
Class to handle errors and exceptions in a simple, consistent stream-based manner.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
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...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
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 &)
Output to memory buffer stream.
void dontThrowExceptions()
label sourceFileLineNumber() const