[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core dumped while scheme_apply



Quoting Paul Argentoff:
> When I call scheme_apply and the scheme function which I call generates a 
> runtime error, my program dumps core because of segfault while calling libc's
> longjmp() (that's what gdb says).
> 
> Does anybody know how to avoid this?

Use scheme_setjmp:

 ...
  if (scheme_setjmp(scheme_error_buf)) {
    /* There was an error */
    ...
  } else {
    v = scheme_eval_string(s, env);
  }
  ...

See

 http://download.plt-scheme.org/doc/200alpha9/html/insidemz/insidemz-Z-H-7.html

for more details.


Matthew