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:
Jon Siwek 2012-06-11 15:35:09 -05:00
parent 83dcbd4aa7
commit c5d3ea009d
4 changed files with 55 additions and 12 deletions

View file

@ -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() )
{