Remix.run Logo
trinix912 7 hours 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 7 hours ago | parent | next [-]

Your process can crash or be killed at any moment anyway. Depending on in-band cleanup is not reliable.

nomel 6 hours ago | parent [-]

Sure, but there are many cases where you don't have to halt because you can cleanup and carry on.

matheusmoreira 7 hours ago | parent | prev [-]

> 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. :)