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

Allow Snitcher.snitch to take a block #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

danielmorrison
Copy link
Member

@danielmorrison danielmorrison commented Jan 30, 2024

I was moving some stuff into Ruby that was previously using Field Agent. I found myself wanting a block syntax to mimic the niceties of Field Agent.

This could be enough, but tracking the duration would be a nice extra. Anything else it should do?

If you manually set an error message and a status, should those take priority? Easy enough to change those to ||=.

- Don't override manually set status/message.
- Better message
- Re-raise the error
- Add some docs
lib/snitcher.rb Outdated Show resolved Hide resolved
lib/snitcher.rb Outdated Show resolved Hide resolved
danielmorrison and others added 2 commits January 30, 2024 14:25
Co-authored-by: Chris Gaffney <[email protected]>
Ensure snitch with a block raises an error in a block, but hides an error with the snitch processing.
@danielmorrison
Copy link
Member Author

Ok, I have this how I think it should be working. Messier than I'd like.

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

Successfully merging this pull request may close these issues.

2 participants