Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Is our current strategy for handling instrument errors optimal? #47
Right now, if an instrumentation callback raises an exception, we (a)
This is the only place in trio that discards exceptions instead of handling or propagating them. Is this the right choice?
The motivation is that instrumentation gets called at all kinds of weird times where it's quite difficult to propagate an error, and it's not clear where to propagate to in any case, and while we in general prefer to crash early and noisily in general it's still probably true that no-one wants their instrumentation to take down their server (I think).
The downside are the obvious ones: it's easy to miss stuff dumped to stderr, if some tool is trying to automatically collect instrumentation then it could get wedged in unexpected ways if the instrument just disappears, etc.
So, I'm not entirely sure this is the best approach, and would be interested to hear what others think.
Hmm, so the idea would be that unhandled exceptions still automatically get printed and kick-out the instrument, but there would be a general life-cycle hook (or hooks,