Re: [Bro-Dev] Consistent error handling for scripting mistakes

2018-11-14 Thread Jon Siwek
On Tue, Nov 13, 2018 at 4:32 PM Vern Paxson wrote: > > I like what you & Robin sketch. FWIW, it's hard for me to get excited > over the issue of leaks-in-the-face-of-error-recovery. Yeah, it's not great, but intention would still be to eventually fix the leakage problem, too. Anyway, made a

Re: [Bro-Dev] Consistent error handling for scripting mistakes

2018-11-13 Thread Vern Paxson
I like what you & Robin sketch. FWIW, it's hard for me to get excited over the issue of leaks-in-the-face-of-error-recovery. Presumably it would take in practice a lot of error recovery before this actually hoses the execution due to running out of memory. At that point, it's not unreasonable

Re: [Bro-Dev] Consistent error handling for scripting mistakes

2018-11-12 Thread Robin Sommer
On Mon, Nov 12, 2018 at 12:27 -0600, Jonathan Siwek wrote: > I recently noticed there's a range of behaviors in how various > scripting mistakes are treated. There's a 4th: InterpreterException. > 1st question: should these be made more consistent? I'd say yes. Yes, definitely. > that it's

Re: [Bro-Dev] Consistent error handling for scripting mistakes

2018-11-12 Thread Jon Siwek
On Mon, Nov 12, 2018 at 1:44 PM Jim Mellander wrote: > I 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: Yes, that's a bit of a different topic, but still tracked

Re: [Bro-Dev] Consistent error handling for scripting mistakes

2018-11-12 Thread Jim Mellander
Along the same vein of sensible Bro script error handling, I'm resending an issue I found in January: I 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-Dev] Consistent error handling for scripting mistakes

2018-11-12 Thread Jon Siwek
Trying to broaden the scope of: https://github.com/bro/bro/issues/208 I recently noticed there's a range of behaviors in how various scripting mistakes are treated. They may (1) abort, as in case of bad subnet mask or incompatible vector element assignment (2) skip over evaluating