Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify usage patterns spicy::decline_input() vs throw #1518

Open
awelzel opened this issue Sep 6, 2023 · 0 comments
Open

Clarify usage patterns spicy::decline_input() vs throw #1518

awelzel opened this issue Sep 6, 2023 · 0 comments

Comments

@awelzel
Copy link
Contributor

awelzel commented Sep 6, 2023

See discussion below - I'm uncertain if this is a Spicy or Zeek issue, putting it in Spicy for now.

zeek/zeek#3277 (comment)_

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)

@awelzel awelzel changed the title Clarify usage patterns spicy::decline_input() vs Spicy's throw Clarify usage patterns spicy::decline_input() vs throw Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant