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

Add optional exception label to with-duration #44

Open
reutsharabani opened this issue Apr 12, 2020 · 0 comments
Open

Add optional exception label to with-duration #44

reutsharabani opened this issue Apr 12, 2020 · 0 comments

Comments

@reutsharabani
Copy link

reutsharabani commented Apr 12, 2020

Currently, when using with-duration it does not differentiate failed executions from successful ones. Since with-duration is probably around IO a failure is definitely interesting and IMO should be separated by a label (e.g. status with value success/failed - but I didn't give it much thought).

The current solution is to either write something specific (macro/manual code) or wrap twice (using with-duration and exceptions.with-exception). IMO the common use case of with-duration should consider exceptions since it is probably mostly around IO.

WDYT?

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