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 IAA03521; Tue, 21 Jan 2003 08:49:42 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA03160 for ; Tue, 21 Jan 2003 08:49:41 +0100 (MET) Received: from pat.uio.no (pat.uio.no [129.240.130.16]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h0L7nfv17889 for ; Tue, 21 Jan 2003 08:49:41 +0100 (MET) Received: from itherther.simula.no ([129.240.228.187]) by pat.uio.no with esmtp (Exim 2.12 #7) id 18atAC-0005Ge-00 for caml-list@inria.fr; Tue, 21 Jan 2003 08:49:40 +0100 Received: from hans by itherther.simula.no with local (Exim 3.36 #1) id 18atAC-00082q-00 for caml-list@inria.fr; Tue, 21 Jan 2003 08:49:40 +0100 To: caml-list@inria.fr Subject: [Caml-list] String of '_' (any) exception? From: Hans Ole Rafaelsen Date: 21 Jan 2003 08:49:40 +0100 Message-ID: <3azsmvn7xij.fsf@itherther.simula.no> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, does it exist a way to get hold of a the string (if any) associated with an exception, when the exception has been caught with the "_" (any) exception? What I am interested in is to get hold of the information which the run-time normally prints when it exits. let _ = List.nth [4; 5] 4 itherther [14] [08:30] [~] ./a.out Fatal error: exception Failure("nth") I want to get the string produced, or the information needed to produce it myself. The intended usage for this is in a RPC server library, where the application raise some exception. It would be convenient to re-raise this as an remote exception, or at least report it back to the client. Kindest regards, Hans Ole Rafaelsen ------------------- 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