|
@@ -1438,20 +1438,21 @@ void printStackReport(__int64 startIP)
|
|
|
class jlib_decl CError : public CInterfaceOf<IError>
|
|
|
{
|
|
|
public:
|
|
|
- CError(WarnErrorCategory _category,ErrorSeverity _severity, int _no, const char* _msg, const char* _filename, int _lineno, int _column, int _position, unsigned _activity);
|
|
|
-
|
|
|
- virtual int errorCode() const { return no; }
|
|
|
- virtual StringBuffer & errorMessage(StringBuffer & ret) const { return ret.append(msg); }
|
|
|
- virtual MessageAudience errorAudience() const { return MSGAUD_user; }
|
|
|
- virtual const char* getFilename() const { return filename; }
|
|
|
- virtual WarnErrorCategory getCategory() const { return category; }
|
|
|
- virtual int getLine() const { return lineno; }
|
|
|
- virtual int getColumn() const { return column; }
|
|
|
- virtual int getPosition() const { return position; }
|
|
|
- virtual StringBuffer& toString(StringBuffer&) const;
|
|
|
- virtual ErrorSeverity getSeverity() const { return severity; }
|
|
|
- virtual IError * cloneSetSeverity(ErrorSeverity _severity) const;
|
|
|
- virtual unsigned getActivity() const { return activity; }
|
|
|
+ CError(WarnErrorCategory _category,ErrorSeverity _severity, int _no, const char* _msg, const char* _filename, int _lineno, int _column, int _position, unsigned _activity, const char * _scope);
|
|
|
+
|
|
|
+ virtual int errorCode() const override { return no; }
|
|
|
+ virtual StringBuffer & errorMessage(StringBuffer & ret) const override { return ret.append(msg); }
|
|
|
+ virtual MessageAudience errorAudience() const override { return MSGAUD_user; }
|
|
|
+ virtual const char* getFilename() const override { return filename; }
|
|
|
+ virtual WarnErrorCategory getCategory() const override { return category; }
|
|
|
+ virtual int getLine() const override { return lineno; }
|
|
|
+ virtual int getColumn() const override { return column; }
|
|
|
+ virtual int getPosition() const override { return position; }
|
|
|
+ virtual StringBuffer& toString(StringBuffer&) const override;
|
|
|
+ virtual ErrorSeverity getSeverity() const override { return severity; }
|
|
|
+ virtual IError * cloneSetSeverity(ErrorSeverity _severity) const override;
|
|
|
+ virtual unsigned getActivity() const override { return activity; }
|
|
|
+ virtual const char * queryScope() const override { return scope; }
|
|
|
|
|
|
protected:
|
|
|
ErrorSeverity severity;
|
|
@@ -1459,14 +1460,15 @@ protected:
|
|
|
int no;
|
|
|
StringAttr msg;
|
|
|
StringAttr filename;
|
|
|
+ StringAttr scope;
|
|
|
int lineno;
|
|
|
int column;
|
|
|
int position;
|
|
|
unsigned activity;
|
|
|
};
|
|
|
|
|
|
-CError::CError(WarnErrorCategory _category, ErrorSeverity _severity, int _no, const char* _msg, const char* _filename, int _lineno, int _column, int _position, unsigned _activity)
|
|
|
- : severity(_severity), category(_category), msg(_msg), filename(_filename), activity(_activity)
|
|
|
+CError::CError(WarnErrorCategory _category, ErrorSeverity _severity, int _no, const char* _msg, const char* _filename, int _lineno, int _column, int _position, unsigned _activity, const char * _scope)
|
|
|
+ : severity(_severity), category(_category), msg(_msg), filename(_filename), scope(_scope), activity(_activity)
|
|
|
{
|
|
|
no = _no;
|
|
|
lineno = _lineno;
|
|
@@ -1491,15 +1493,15 @@ IError * CError::cloneSetSeverity(ErrorSeverity newSeverity) const
|
|
|
{
|
|
|
return new CError(category, newSeverity,
|
|
|
errorCode(), msg, filename,
|
|
|
- getLine(), getColumn(), getPosition(), getActivity());
|
|
|
+ getLine(), getColumn(), getPosition(), getActivity(), queryScope());
|
|
|
}
|
|
|
|
|
|
-IError *createError(WarnErrorCategory category, ErrorSeverity severity, int errNo, const char *msg, const char * filename, int lineno, int column, int pos, unsigned activity)
|
|
|
+IError *createError(WarnErrorCategory category, ErrorSeverity severity, int errNo, const char *msg, const char * filename, int lineno, int column, int pos, unsigned activity, const char * scope)
|
|
|
{
|
|
|
- return new CError(category,severity,errNo,msg,filename,lineno,column,pos, activity);
|
|
|
+ return new CError(category,severity,errNo,msg,filename,lineno,column,pos, activity, scope);
|
|
|
}
|
|
|
|
|
|
-IError *createError(WarnErrorCategory category, ErrorSeverity severity, int errNo, const char *msg, unsigned activity)
|
|
|
+IError *createError(WarnErrorCategory category, ErrorSeverity severity, int errNo, const char *msg, unsigned activity, const char * scope)
|
|
|
{
|
|
|
- return new CError(category,severity,errNo,msg,nullptr, 0, 0, 0, activity);
|
|
|
+ return new CError(category,severity,errNo,msg,nullptr, 0, 0, 0, activity, scope);
|
|
|
}
|