add setjmp/longjmp for error branching.