English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Exception Unix_error problem in toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-02 (12:03)
From: ls-ocaml-developer-2006@m...
Subject: Re: [Caml-list] Exception Unix_error problem in toplevel

Bob Williams <a6a37331@telus.net> writes:

Bob Williams <a6a37331@telus.net> writes:

> OCaml version :  3.09.2-9
> Distribution  :  Debian Linux for i386
> Linux kernel  :  2.6.18

> Summary of problem: If you call a function from a script, that
> function will raise and catch Unix_error properly.  However, if you
> call the same function interactively from an OCaml toplevel, the
> function will see an exception but will think it is *not* Unix_error.
> A demonstration appears below.


> 	$ ocaml unix.cma bug.cmo
> 	        Objective Caml version 3.09.2
> 	# Bug.delete_file ();;
> 	Some other error.

I couldn't reproduce that on Debian Sarge (Stable is Sarge as of this
date) neither with

 - Objective Caml version 3.08.3 -- as distributed with Sarge.

nor with

 - Objective Caml version 3.09.2 -- as compiled by me from GODI 2
   months ago.

Are you running Testing or something like this? Since I assume that
exceptions are represented just by integer "tags" at the VM level:
Might there be a library mismatch in your case? (This is a question to
the experts here, since my understanding was that that is prevented by
checksums in the interfaces).

Whatever: If your ocaml comes from Debian (and not from GODI or
similar), I suggest you report a bug to the Debian BTS, too. It woul
be terrible, if we had to live with a buggy OCaml for the next 3 years
:-) after the Etch release.

Regards -- Markus