Created
July 1, 2021 17:30
-
-
Save braised-babbage/22b47e188cca1b282035b8ef5a71065d to your computer and use it in GitHub Desktop.
ecl uncaught condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* build and run: clang test.c -lecl -o test && ./test | |
output: | |
Condition of type: SIMPLE-ERROR | |
msg | |
No restarts available. | |
Top level in: #<process TOP-LEVEL 0x106c1af80>. | |
> ^D | |
caught | |
*/ | |
#include <ecl/ecl.h> | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
cl_boot(argc, argv); | |
cl_env_ptr env = ecl_process_env(); | |
ECL_CATCH_ALL_BEGIN(env) { | |
cl_eval(ecl_read_from_cstring("(error \"msg\")")); | |
} ECL_CATCH_ALL_IF_CAUGHT { | |
printf("caught\n"); | |
return -1; | |
} ECL_CATCH_ALL_END; | |
printf("not caught\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment