was tinkering with the sumstats code, and inadvertantly deleted the
final "}" closing out the last function. When running the code, the
misleading error message is received:
error in bro/share/bro/base/frameworks/tunnels/./main.bro, line 8: syntax error, at or near "module"
presumably due to the function still being open when the next policy script is loaded. Wouldn't it be more reasonable to check at the end of each script when loaded that there are no dangling functions, expressions, etc. ????
There are also silent fails which probably should give a warning, such as failing to include the fully-qualified event name silently preventing the event from being triggered.
The above are more in the area of parsing vs runtime.
My idea on runtime scripting errors would be to apply a sensible default to the offending expression (null or 0, as the case may be, might be sufficient), log the error, and continue....