Skip to content

Allow Snitcher.snitch to take a block#28

Open
danielmorrison wants to merge 4 commits into
masterfrom
snitch-block
Open

Allow Snitcher.snitch to take a block#28
danielmorrison wants to merge 4 commits into
masterfrom
snitch-block

Conversation

@danielmorrison

@danielmorrison danielmorrison commented Jan 30, 2024

Copy link
Copy Markdown
Member

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
Comment thread lib/snitcher.rb Outdated
Comment thread lib/snitcher.rb Outdated
danielmorrison and others added 2 commits January 30, 2024 14:25
Co-authored-by: Chris Gaffney <gaffneyc@gmail.com>
Ensure snitch with a block raises an error in a block, but hides an error with the snitch processing.
@danielmorrison

Copy link
Copy Markdown
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