[CM] C Stack Unwinding
wdouglass at carnegierobotics.com
Tue Nov 2 18:11:29 PDT 2021
Hey all, I have a question about s7 error handling in C. consider the
attached c file.
It uses `s7_call_with_catch` to call a function that's defined in C,
but has an error. The error handler gets invoked, but the result of it
is returned at line 4, from s7_eval_c_string, and not from
s7_call_with_catch at line 23. also, an "unknown operator" error gets
I made the (bad) assumption that s7 used some setjmp/longjmp magic to
unwind the C stack when an error gets invoked to the catch location.
lesson learned. Is there a more elegant way to detect errors then
"check after every s7 function call"? am i missing something here?
Thanks so much,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 951 bytes
More information about the Cmdist