mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Always emit scripting errors to stderr during zeek_init
Otherwise, setting Reporter::errors_to_stderr=F causes important error messages to be lost (and this setting is the default for ZeekCtl). E.g. now that we terminate if there's errors during zeek_init, GH-369 shows that the only error message given was "fatal error: errors occurred while initializing", which is not helpful in determining the actual issue.
This commit is contained in:
parent
9d07e4f0b8
commit
dd173f4961
6 changed files with 34 additions and 9 deletions
|
@ -7,7 +7,14 @@ redef Reporter::errors_to_stderr = F;
|
|||
|
||||
global test: table[count] of string = {};
|
||||
|
||||
event zeek_init()
|
||||
event my_event()
|
||||
{
|
||||
print test[3];
|
||||
}
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
# Errors within zeek_init are always printed to stderr, so check whether
|
||||
# an error that happens later is suppressed.
|
||||
schedule 0.2sec { my_event() };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue