mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Allow passing a location to BroObj::Warning and BroObj::Error.
This allows callers (such as check_and_promote) to pass an expression location to be logged if the location doesn't exist in the value being promoted.
This commit is contained in:
parent
8ca2cff13f
commit
2d61ea5cd6
4 changed files with 16 additions and 14 deletions
|
@ -118,9 +118,9 @@ public:
|
|||
// included in the message, though if pinpoint_only is non-zero,
|
||||
// then obj2 is only used to pinpoint the location.
|
||||
void Warn(const char* msg, const BroObj* obj2 = 0,
|
||||
int pinpoint_only = 0) const;
|
||||
int pinpoint_only = 0, const Location* expr_location = 0) const;
|
||||
void Error(const char* msg, const BroObj* obj2 = 0,
|
||||
int pinpoint_only = 0) const;
|
||||
int pinpoint_only = 0, const Location* expr_location = 0) const;
|
||||
|
||||
// Report internal errors.
|
||||
void BadTag(const char* msg, const char* t1 = 0,
|
||||
|
@ -178,7 +178,7 @@ private:
|
|||
friend class SuppressErrors;
|
||||
|
||||
void DoMsg(ODesc* d, const char s1[], const BroObj* obj2 = 0,
|
||||
int pinpoint_only = 0) const;
|
||||
int pinpoint_only = 0, const Location* expr_location = 0) const;
|
||||
void PinPoint(ODesc* d, const BroObj* obj2 = 0,
|
||||
int pinpoint_only = 0) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue