[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Richard Samuels <rls25@c...> |
| Subject: | Exception is not caught by callback3_exn() |
I'm calling an ocaml function from C, with the following statements:
{ ... /* setup args */
if (fn_closure == NULL)
fn_closure = caml_named_value ("fn");
answer = callback3_exn(*fn_closure,
Caml_rep, Caml_tofile, Caml_codefile);
if ( Is_exception_result( answer ) ) {
retval = NULL;
CAMLreturn( retval );
}
if (Is_block(answer)) {
... /* handle result */
}
}
Using callback3_exn should catch any exceptions thrown in the code and
return. However, when the caml code throws an exception, my code doesn't
get control and the program terminates! I don't understand what's wrong
here -- could somebody please help?
Thanks,
Richard Samuels
rls25@cornell.edu