mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00

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.
25 lines
589 B
Text
25 lines
589 B
Text
# Expressions in an event handler that raise interpreter exceptions
|
|
# shouldn't abort Bro entirely, but just return from the function body.
|
|
#
|
|
# @TEST-EXEC: bro -r $TRACES/wikipedia.trace %INPUT >output
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff reporter.log
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
event connection_established(c: connection)
|
|
{
|
|
print c$ftp;
|
|
print "not reached";
|
|
}
|
|
|
|
event connection_established(c: connection)
|
|
{
|
|
if ( c?$ftp )
|
|
print c$ftp;
|
|
else
|
|
print "ftp field missing";
|
|
}
|
|
|
|
event connection_established(c: connection)
|
|
{
|
|
print c$id;
|
|
}
|