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 PAA10340; Tue, 16 Apr 2002 15:10:20 +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 PAA12156 for ; Tue, 16 Apr 2002 15:10:19 +0200 (MET DST) Received: from hirsch.in-berlin.de (hirsch.in-berlin.de [192.109.42.6]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g3GDAI515339 for ; Tue, 16 Apr 2002 15:10:18 +0200 (MET DST) Received: from hirsch.in-berlin.de (localhost [127.0.0.1]) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id g3GDAHtG025945 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT); Tue, 16 Apr 2002 15:10:17 +0200 Received: (from uucp@localhost) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with UUCP id g3GDA2nj025894; Tue, 16 Apr 2002 15:10:02 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: caml-list@inria.fr Received: from localhost (oliver@localhost) by first.in-berlin.de (8.7.6/8.7.3) with SMTP id PAA00252; Tue, 16 Apr 2002 15:04:35 +0200 Date: Tue, 16 Apr 2002 15:04:34 +0200 (MET DST) From: Oliver Bandel To: Shawn Wagner cc: caml-list@inria.fr Subject: Re: [Caml-list] Catching errors (Unix-Module) In-Reply-To: <20020415155915.K32318@speakeasy.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, On Mon, 15 Apr 2002, Shawn Wagner wrote: > try > Unix.stat "/foo/bar" > with > | Unix.Unix_error (code, func, file) -> > Printf.fprintf stderr "Couldn't %s '%s': %s!\n" > func file (Unix.error_message code) OK, let's try it: ============================================ oliver@first:/home/oliver > unix-top Objective Caml version 3.01 # try Unix.stat "/foo/bar" with | Unix.Unix_error (code, func, file) -> Printf.fprintf stderr "Couldn't %s '%s': %s!\n" func file (Unix.error_message code) ;; Characters 74-161: This expression has type unit but is here used with type Unix.stats # ============================================ Maybe this is a OCaml 3.01-problem? Or is there a general problem with that code? Ciao, Oliver ------------------- 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