Go to the documentation of this file.
32 #ifndef CocoParserErrors_H
33 #define CocoParserErrors_H
47 template<
class BaseClass,
class StringClass=std::w
string>
92 virtual void Warning(
const StringClass& msg)
99 virtual void Warning(
int line,
int col,
const StringClass& msg)
102 <<
"line " <<
line <<
" col " << col <<
": "
107 virtual void Error(
int line,
int col,
const StringClass& msg)
110 <<
"line " <<
line <<
" col " << col <<
": " << msg <<
endl
115 virtual void Error(
const StringClass& msg)
123 virtual void Exception(
const StringClass& msg)
Templated class to shadow the error handling for Coco/R parsers.
A class for handling words, derived from string.
virtual void Warning(int line, int col, const StringClass &msg)
Handle a general warning 'msg'.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~CocoParserErrors()
Destructor.
virtual void Error(int line, int col, const StringClass &msg)
Handle general error 'msg' (eg, a semantic error)
A wide-character and a pointer to a wide-character string.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
word name_
The name issued in warnings and errors.
CocoParserErrors(const word &name)
Construct with given name.
virtual void Exception(const StringClass &msg)
Handle a general exception 'msg'.
virtual void Error(const StringClass &msg)
Handle general error 'msg' (eg, a semantic error)
virtual void Warning(const StringClass &msg)
Handle a general warning 'msg'.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual const word & name() const
Return the name issued for warnings.
virtual word & name()
Return the name issued for warnings.