Must catch and translate exceptions on top level

If there's an unhandled exception the runtime can call `terminate()` immediately without unwinding the stack and this can cause a whole bunch of undesired side effects. This change uses `printf()` because it is exception safe. Resolves CIDs 1037072, 1037071, 1037070, 1037068, 1037067.