[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Oliver Bandel <oliver@f...> |
| Subject: | Re: [Caml-list] Catching errors (Unix-Module) |
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