mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Fix exceptions thrown in event handlers preventing others from running.
If some expression in an event handler body causes an InterpreterException internally, then the rest of that body doesn't get executed, but also the bodies of any other handlers were not executed.
This commit is contained in:
parent
83dcbd4aa7
commit
c5d3ea009d
4 changed files with 55 additions and 12 deletions
11
src/Func.cc
11
src/Func.cc
|
@ -329,7 +329,16 @@ Val* BroFunc::Call(val_list* args, Frame* parent) const
|
|||
bodies[i].stmts->GetLocationInfo());
|
||||
|
||||
Unref(result);
|
||||
result = bodies[i].stmts->Exec(f, flow);
|
||||
|
||||
try
|
||||
{
|
||||
result = bodies[i].stmts->Exec(f, flow);
|
||||
}
|
||||
catch ( InterpreterException& e )
|
||||
{
|
||||
// already reported, but should continue exec'ing remaining bodies
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( f->HasDelayed() )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue