4 ms·
Could you set a single breakpoint for the error logging branch and have it catch all unexpected errors?
by Kinrany 4y ago
Could you set a single breakpoint for the error logging branch and have it catch all unexpected errors?
- eurasiantiger 4y agoIn many debuggers, there is an option to break on unhandled / handled / all exceptions.
- tlarkworthy 4y agoYeah but that often casts the net too wide and catches expected 3rd party internal logic or catches the exception too high and you lose the local context.
- tlarkworthy 4y agoYes with "debugger" in JS and 'breakpoint()' in Python. It's great! For defensive programming I have a common assert routine which does all of the above