From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA11641; Sat, 28 Aug 2004 00:30:29 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA15418 for ; Sat, 28 Aug 2004 00:30:28 +0200 (MET DST) Received: from plato.rocketdogcreative.com (plato.rocketdogcreative.com [66.139.78.99]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i7RMUQml030021 for ; Sat, 28 Aug 2004 00:30:27 +0200 Received: from [10.0.1.3] (168-103-58-53.tcsn.qwest.net [168.103.58.53]) by plato.rocketdogcreative.com (8.11.6/8.11.6) with ESMTP id i7RMURF29325 for ; Fri, 27 Aug 2004 15:30:27 -0700 Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: caml-list@inria.fr From: David McClain Subject: [Caml-list] C++ Throws Date: Fri, 27 Aug 2004 15:31:33 -0700 X-Mailer: Apple Mail (2.619) X-Miltered: at concorde with ID 412FB602.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; mcclain:01 mcclain:01 unhandled:01 abort:01 overriding:01 callback:01 generic:01 ocaml:01 ocaml:01 handler:01 handler:01 token:01 exception:02 complex:03 interface:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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