caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Samuels <rls25@cornell.edu>
To: caml-list@inria.fr
Subject: Exception is not caught by callback3_exn()
Date: Mon, 22 May 2000 15:15:43 -0400	[thread overview]
Message-ID: <4.2.0.58.20000522150541.00b0b430@postoffice.mail.cornell.edu> (raw)

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




             reply	other threads:[~2000-05-22 20:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-22 19:15 Richard Samuels [this message]
2000-05-23  8:18 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.2.0.58.20000522150541.00b0b430@postoffice.mail.cornell.edu \
    --to=rls25@cornell.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).