mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Avoiding infinite loops when an error message handlers triggers errors
itself. If an error is triggered inside one of the reporter_* handlers, the message about that will now fall back to stderr.
This commit is contained in:
parent
66e2c3b623
commit
fb6a8cec19
16 changed files with 94 additions and 11 deletions
|
@ -223,6 +223,7 @@ void ID::UpdateValAttrs()
|
|||
if ( Type()->Tag() == TYPE_FUNC )
|
||||
{
|
||||
Attr* attr = attrs->FindAttr(ATTR_GROUP);
|
||||
|
||||
if ( attr )
|
||||
{
|
||||
Val* group = attr->AttrExpr()->ExprVal();
|
||||
|
@ -234,6 +235,11 @@ void ID::UpdateValAttrs()
|
|||
Error("&group attribute takes string");
|
||||
}
|
||||
}
|
||||
|
||||
attr = attrs->FindAttr(ATTR_ERROR_HANDLER);
|
||||
|
||||
if ( attr )
|
||||
event_registry->SetErrorHandler(Name());
|
||||
}
|
||||
|
||||
if ( Type()->Tag() == TYPE_RECORD )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue