3 ms·
Sometimes it’s useful to handle the exception somewhere near its origin so you can close related resources, lockfiles, etc. without needing a VB6 style “On Erro
by trinix912 9mo ago
Sometimes it’s useful to handle the exception somewhere near its origin so you can close related resources, lockfiles, etc. without needing a VB6 style “On Error GoTo X” global error handler that has to account for all different contexts under which the exceptional situation might have occurred.
- PhilipRoman 9mo agoYour process can crash or be killed at any moment anyway. Depending on in-band cleanup is not reliable.
- nomel 9mo agoSure, but there are many cases where you don't have to halt because you can cleanup and carry on.
- matheusmoreira 9mo ago> a VB6 style “On Error GoTo X” global error handler that has to account for all different contexts under which the exceptional situation might have occurred ... That seems like a pretty accurate description of how exception handling mechanisms are implemented under the hood. :)