It should not be necessary to pop_stack before throwing error(), because error_handler() will need to unwind the stack to the nearest CATCH frame anyway.  (I used efuns_main.c as an example of how to call error().)