When a transducer is applied to a channel and an exception occurs during transformation the ex-handler will be called with
the Throwable as an argument.
Can we also send the val which caused the transformation exception to the ex-handler? When dealing with transducer errors it might be useful to have the full picture.
If that's agreeable, and the solution is a second-arity on ex-handler that takes val and throwable, and the call applied is:
Found the same need when using core.async/pipeline in my code. Wrote a patch of sorts (demonstrative) which allows you to have val in the exh for clj. Happy to write a full patch if this looks okay.
Comment made by: d-t-w
Perhaps leave the ex-handler as-is, but pass an ex-info rather than simply the caught Throwable. Value that caused the exception provided in the ex-info map, Throwable as cause.