From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6DF03BB81 for ; Mon, 10 Oct 2005 05:24:34 +0200 (CEST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9A3OXS4016579 for ; Mon, 10 Oct 2005 05:24:34 +0200 Received: by zproxy.gmail.com with SMTP id z31so97369nzd for ; Sun, 09 Oct 2005 20:24:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kgxEI7kHQaPWqEds1xHhHYIaPQcVLrPFUetUkupD4YrdvmWBB/pBfZVEAxsf3gxFZKaj97tBjWuHoVrOvaY6rtntNwL6YKZxh9+ASScJMJm3tIovD9lvdkBR30vwhwr/Kb9DfR2bFhgYbJayUuU5qzf54cnSIKawOiwryDj5jUM= Received: by 10.36.250.40 with SMTP id x40mr4263623nzh; Sun, 09 Oct 2005 20:24:33 -0700 (PDT) Received: by 10.36.9.4 with HTTP; Sun, 9 Oct 2005 20:24:33 -0700 (PDT) Message-ID: Date: Mon, 10 Oct 2005 12:24:33 +0900 From: Eijiro Sumii Reply-To: sumii@ecei.tohoku.ac.jp To: caml-list@yquem.inria.fr Subject: Re: line number in exception history? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Miltered: at nez-perce with ID 4349DEF1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; eijiro:01 sumii:01 eijiro:01 sumii:01 foo:01 foo:01 ocamlc:01 pervasives:01 exception:01 exception:01 int:01 argument:01 variant:02 env:03 raise:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 P.S. The following variant is even more strange. (Look at the "re-raised" line, please.) > cat foo.ml let fooFunction x =3D if x > 0 then x - 1 else raise (invalid_arg "Give me positive!") > cat bar.ml let barFunction x =3D let y =3D x + 1 in Foo.fooFunction y > cat main.ml let f () =3D () let test () =3D try Bar.barFunction (-10) with e -> raise e let g y =3D y + 1 let () =3D f (); let ret =3D test () in print_int (ret + 100) > ocamlc -g foo.ml bar.ml main.ml -o test > env OCAMLRUNPARAM=3Db ./test Fatal error: exception Invalid_argument("Give me positive!") Raised at file "pervasives.ml", line 22, character 17 Re-raised at file "foo.ml", line 3, character 46 Called from file "main.ml", line 5, character 25 Re-raised at file "main.ml", line 1, character 11 Called from file "main.ml", line 13, character 2