Version française
Home     About     Download     Resources     Contact us    
Browse thread
try and tail call
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: ketty <kattlachan@g...>
Subject: Re: [Caml-list] try and tail call
Hi,

On 10/21/06, Christophe Raffalli <raffalli@univ-savoie.fr> wrote:
>
>
>   try
>     ...
>   end
>     ... (* the exception raised here are not handles by with but
> propagated *)
>   with
>     ...


You could do it like this:

exception Propagate of exn

try
  ...
  try ...
  with x -> raise (Propagate x)
with
  | Propagate x -> raise x
  | ...