Added setjmp-based try/catch error handling.