#include <stdio.h>
#include <setjmp.h>
jmp_buf buf;
void error_recovery() {
printf("detected an undrecoverable error\n");
longjmp(buf, 1);
}
int main() {
while (1) {
if (setjmp(buf)) {
printf("back in main\n");
break;
}
else {
error_recovery();
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: