From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 01B42BC69 for ; Sun, 22 Oct 2006 04:44:07 +0200 (CEST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id k9M2i7eq028298 for ; Sun, 22 Oct 2006 04:44:07 +0200 Received: by nf-out-0910.google.com with SMTP id y38so1918557nfb for ; Sat, 21 Oct 2006 19:44:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=lQXi7VSnXTzz0yw6aBhFR0EFZi85DRuKYSpOGusGFj/E98Us1ahJQ9mQh2mQrodULqWQjWL7wOzVRqQYV9VXPXwr6IL2+u9+L1e2Fp7Y9zEIK0b4wYJ+QiDTZZutN7czVQ3pnkP1xPat9UfELMepqS7CWy1P+T2wMd63hWsILt0= Received: by 10.78.128.15 with SMTP id a15mr4889326hud; Sat, 21 Oct 2006 19:44:06 -0700 (PDT) Received: by 10.78.188.20 with HTTP; Sat, 21 Oct 2006 19:44:06 -0700 (PDT) Message-ID: <6ebe51ce0610211944m6f40358exb7793ecef4889f09@mail.gmail.com> Date: Sun, 22 Oct 2006 04:44:06 +0200 From: ketty To: "Christophe Raffalli" Subject: Re: [Caml-list] try and tail call Cc: caml-list@inria.fr In-Reply-To: <453A27EB.8070609@univ-savoie.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_87162_21856483.1161485046959" References: <453A27EB.8070609@univ-savoie.fr> X-j-chkmail-Score: MSGID : 453ADAF7.000 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 453ADAF7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 raffalli:01 univ-savoie:01 exn:01 christophe:01 univ-savoie:01 exn:01 ketty:98 wrote:01 wrote:01 caml-list:01 exception:01 exception:01 tail:01 X-Attachments: cset="UTF-8" cset="UTF-8" ------=_Part_87162_21856483.1161485046959 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, On 10/21/06, Christophe Raffalli 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 | ... ------=_Part_87162_21856483.1161485046959 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
  | ...

------=_Part_87162_21856483.1161485046959--