Use setjmp/longjmp instead of the monadic implementation of exceptions
Fix the order of parameters