iapetos icon indicating copy to clipboard operation
iapetos copied to clipboard

Add optional exception label to with-duration

Open reutsharabani opened this issue 5 years ago • 0 comments

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?

reutsharabani avatar Apr 12 '20 10:04 reutsharabani