clj-commons / manifold

A compatibility layer for event-driven abstractions
1.02k stars 106 forks source link

Report unconsumed errors to a Manifold UnconsumedExceptionHandler? #145

Open danielcompton opened 6 years ago

danielcompton commented 6 years ago

I've noticed a few manifold unconsumed deferred errors bubbling up around the place. I wondered if it would be useful to be able to set an ManifoldUnconsumedExceptionHandler, with similar semantics to a Java DefaultUncaughtExceptionHandler? This could be used to report the error to exception trackers, or other sources, rather than just logging it.

I'm not intimately familiar with Manifold, so there may be some reasons why this is a bad idea?

ztellman commented 6 years ago

This seems like a reasonable request. Remember that the "unconsumed errors" are not exhaustively listed, only 1 in 1000 have the finalizer callback enabled (otherwise it's a performance issue), so it's not perfectly like the Java thread error handler, but I agree that's still useful.