You could just goto error handler if you found error. Then make just one exit of it, and exit with @ Reset.
This will reset PIC and clear stack. Same way as if you power off then on.