mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58: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
|
@ -96,6 +96,15 @@ void EventRegistry::SetGroup(const char* name, const char* group)
|
|||
eh->SetGroup(group);
|
||||
}
|
||||
|
||||
void EventRegistry::SetErrorHandler(const char* name)
|
||||
{
|
||||
EventHandler* eh = Lookup(name);
|
||||
if ( ! eh )
|
||||
reporter->InternalError("unknown event handler in SetErrorHandler()");
|
||||
|
||||
eh->SetErrorHandler();
|
||||
}
|
||||
|
||||
void EventRegistry::EnableGroup(const char* group, bool enable)
|
||||
{
|
||||
IterCookie* c = handlers.InitForIteration();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue