17 #ifndef __OMNETPP_NEDXML_ERRORSTORE_H
18 #define __OMNETPP_NEDXML_ERRORSTORE_H
47 std::vector<Entry> entries;
51 void doAdd(
ASTNode *context,
const char *loc,
int severity,
const char *message);
68 _OPP_GNU_ATTRIBUTE(format(printf, 3, 4))
69 void addError(
ASTNode *context, const
char *messagefmt, ...);
74 _OPP_GNU_ATTRIBUTE(format(printf, 3, 4))
75 void addError(const
char *location, const
char *messagefmt, ...);
80 _OPP_GNU_ATTRIBUTE(format(printf, 3, 4))
81 void addWarning(
ASTNode *context, const
char *messagefmt, ...);
86 _OPP_GNU_ATTRIBUTE(format(printf, 3, 4))
87 void addWarning(const
char *location, const
char *messagefmt, ...);
92 _OPP_GNU_ATTRIBUTE(format(printf, 4, 5))
93 void add(
ASTNode *context,
int severity, const
char *messagefmt, ...);
98 _OPP_GNU_ATTRIBUTE(format(printf, 4, 5))
99 void add(const
char *location,
int severity, const
char *messagefmt, ...);
104 bool empty()
const {
return entries.empty();}
114 bool containsError()
const;
123 const char *errorSeverity(
int i)
const;
124 int errorSeverityCode(
int i)
const;
125 const char *errorLocation(
int i)
const;
126 ASTNode *errorContext(
int i)
const;
127 const char *errorText(
int i)
const;
134 int findFirstErrorFor(
ASTNode *node,
int startIndex)
const;
139 static const char *severityName(
int severity);
143 #define INTERNAL_ERROR0(context,msg) NedInternalError(__FILE__,__LINE__,context,msg)
144 #define INTERNAL_ERROR1(context,msg,arg1) NedInternalError(__FILE__,__LINE__,context,msg,arg1)
145 #define INTERNAL_ERROR2(context,msg,arg1,arg2) NedInternalError(__FILE__,__LINE__,context,msg,arg1,arg2)
146 #define INTERNAL_ERROR3(context,msg,arg1,arg2,arg3) NedInternalError(__FILE__,__LINE__,context,msg,arg1,arg2,arg3)
153 _OPP_GNU_ATTRIBUTE(format(printf, 4, 5))
154 void
NedInternalError(const
char *file,
int line, ASTNode *context, const
char *messagefmt, ...);