Clarify usage patterns spicy::decline_input() vs throw
Opened this issue · 0 comments
awelzel commented
See discussion below - I'm uncertain if this is a Spicy or Zeek issue, putting it in Spicy for now.
Chatting with @bbannier in referenced PR, it would be good to clarify usages of spicy::decline_input()
vs throw
. With Zeek's integration, using spicy::decline_input()
within %error
results in two analyzer_violation_info()
events. Further, the documentation suggests to follow a spicy::decline_input()
with throw
to abort parsing, resulting in two violations, too, and then one could just throw in the first place.
Generally wondering: Is spicy::decline_input()
for edge-cases? Doesn't throw
provide the more expected behavior for most use-cases? (as being similar to &requires)