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 RAA10430; Wed, 2 Oct 2002 17:38:51 +0200 (MET DST) 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 RAA11718 for ; Wed, 2 Oct 2002 17:38:50 +0200 (MET DST) Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g92FcnD29350 for ; Wed, 2 Oct 2002 17:38:49 +0200 (MET DST) Received: from user-0ccegbj.cable.mindspring.com ([24.199.65.115] helo=cs.cornell.edu) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 17wlaJ-0003j8-00 for caml-list@inria.fr; Wed, 02 Oct 2002 08:38:47 -0700 Message-ID: <3D9B1306.6050208@cs.cornell.edu> Date: Wed, 02 Oct 2002 11:38:46 -0400 From: "Yaron M. Minsky" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ocaml List Subject: Re: [Caml-list] Uncaught exceptions (or am I going crazy?) References: <3D9B03DF.5040806@cs.cornell.edu> <3D9B0978.E4A5D96@beaune.inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk All the explanations given so far make sense except for one thing: they all suggest that the program should terminate. But my program doesn't terminate, it just prints out the "Uncaught exception" string and keeps on executing. I am not to my knowledge making any use of threads, so that odesn't seem like it should be the right explanation either. So, any more thoughts? y Didier Le Botlan wrote: > ( << J'ai ! >> ) > > Try this one : > > let arr = Array.create 5 " a cell " > let _ = print_string arr.(0) ; print_string arr.(10) ;; > > > I get << a cell Fatal error: exception Invalid_argument("Array.get") >> > It's a feature ! Reading a cell outside an array raises an exception and > prints it on the screen. > Similarly, when a pipe is closed, a system exception is raised. > Since you do not catch the exception with a 'try ... with Sys_error m -> > ...' block, you get the message on stderr, that is on your screen. > > Does it answer your question ? > > > "Yaron M. Minsky" a écrit : > >>I'm getting some very weird behavior ... >>What's so strange about this is that as far as I can tell, there is no >>place in my code where I actually print out such errors. > ------------------- 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