caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] C++ Throws
@ 2004-08-27 22:31 David McClain
  2004-08-27 23:24 ` Brian Hurt
  0 siblings, 1 reply; 12+ messages in thread
From: David McClain @ 2004-08-27 22:31 UTC (permalink / raw)
  To: caml-list

I now see that OCaml is not converting anything, per se... Apparently 
when the throw handler detects an unhandled condition it decides to 
call abort(), against which there is no defense.

However, it also appears that once a C call returns to OCaml, OCaml 
reinstates its own trap handling, overriding anything that may have 
been left in place by the called C function. This is possibly 
understandable.

But by the same token, at startup, I call a C main() which in turn 
starts up OCaml. That give it a chance to establish its environment. 
Then the main routine designated in OCaml calls another C routine that 
encloses a callback to OCaml within try-catch, and this is being 
overridden by OCaml.

So there appears to be something relatively complex going on across the 
foreign function interface with OCaml and C. This override is what 
frustrates the attempts to create a generic C++ exception handler.

David McClain
Senior Corporate Scientist
Avisere, Inc.

david.mcclain@avisere.com
+1.520.390.7738 (USA)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-08-28  9:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-27 22:31 [Caml-list] C++ Throws David McClain
2004-08-27 23:24 ` Brian Hurt
2004-08-28  0:11   ` David McClain
2004-08-28  1:40     ` skaller
2004-08-28  4:13       ` David McClain
2004-08-28  4:55         ` David Brown
2004-08-28  7:44           ` Ville-Pertti Keinonen
2004-08-28  7:48           ` Radu-Mihail Obada
2004-08-28  8:17         ` Xavier Leroy
2004-08-28  9:24           ` skaller
2004-08-28  9:31         ` skaller
2004-08-28  0:22   ` David McClain

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).