Version française
Home     About     Download     Resources     Contact us    
Browse thread
Uncaught Unix_error.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Baelde <david.baelde@g...>
Subject: Re: [Caml-list] Uncaught Unix_error.
On Thu, Jun 18, 2009 at 3:17 PM, Stéphane Glondu<steph@glondu.net> wrote:
> Such errors can also happen if you link the (same) Unix module twice:
> the exceptions raised by the first instance are not catchable by
> anything linked after the second instance.

Both liquidsoap and ocaml-duppy are compiled with -threads, so they
are using the same version of Unix. Duppy is not linked against Unix,
only requires it through ocamlfind. Could it be that ocamlfind (on
some versions) links Unix twice in liquidsoap? I did not know it was
even possible (except with Dynlink).

Also, note that the call to read that raises the error is from the
same module that tries to catch the exception.

I'm lost, I'd like to understand when the exception is registered: at
runtime initialization? In this case, only one should ever be
registered (at least it seems easy to enforce). Or is it statically
registered somehow?

-- 
David