in reply to Crash immunity

You might find Attempt of interest.

Basically my approach would be to wrap code that might fail in an eval and store whatever state I need so I can restore it on failure.