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 XAA30922; Tue, 4 Jun 2002 23:09:15 +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 XAA30918 for ; Tue, 4 Jun 2002 23:09:15 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g54L9EH11141 for ; Tue, 4 Jun 2002 23:09:14 +0200 (MET DST) Received: from mel-rta8.wanadoo.fr (193.252.19.79) by mel-rto2.wanadoo.fr (6.5.007) id 3CFB20330014BD1A for caml-list@inria.fr; Tue, 4 Jun 2002 23:09:13 +0200 Received: from debian (80.8.82.98) by mel-rta8.wanadoo.fr (6.5.007) id 3CFB23D900130F73 for caml-list@inria.fr; Tue, 4 Jun 2002 23:09:13 +0200 Received: from moi by debian with local (Exim 3.35 #1 (Debian)) id 17FLZn-0003kr-00 for ; Tue, 04 Jun 2002 23:10:47 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] Exceptions and at_exit References: <874rgjdjku.fsf@foxthompson.net> From: Remi VANICAT Date: Tue, 04 Jun 2002 23:10:47 +0200 In-Reply-To: <874rgjdjku.fsf@foxthompson.net> (David Fox's message of "04 Jun 2002 10:45:05 -0700") Message-ID: <87g0024unc.dlv@wanadoo.fr> User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk David Fox writes: > I have some at_exit functions that must execute before my program > exits, but I also want to see a traceback of any exception that > occurs. Can I catch the exception, print a traceback like the one you > get when you exit and then call exit? Or can I catch the exception, > execute the at_exit functions, and then re-raise the exception? How > *do* you re-raise an exception, anyway? Do you just catch the > exception and raise it? for reraising an exception : try foo bar with x -> baaz buz; raise x but i don't know if this work well with traceback. -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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