From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0HH2YEv031563 for ; Mon, 17 Jan 2011 18:02:34 +0100 X-IronPort-AV: E=Sophos;i="4.60,333,1291590000"; d="scan'208,217";a="87141352" Received: from zmbs4.inria.fr ([128.93.142.17]) by mail2-relais-roc.national.inria.fr with ESMTP; 17 Jan 2011 18:02:29 +0100 Date: Mon, 17 Jan 2011 18:02:29 +0100 (CET) From: Xavier Clerc To: Ashish Agarwal Cc: Caml List Message-ID: <560327307.145239.1295283749745.JavaMail.root@zmbs4.inria.fr> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_145238_292378349.1295283749745" X-Originating-IP: [82.216.3.22] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Mac)/6.0.10_GA_2692) Subject: Re: [Caml-list] printing an exception changes printed backtrace ------=_Part_145238_292378349.1295283749745 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ----- Mail original ----- De: "Ashish Agarwal" =20 =C0: "xclerc" =20 Cc: "Caml List" =20 Envoy=E9: Lundi 17 Janvier 2011 17:41:13=20 Objet: Re: [Caml-list] printing an exception changes printed backtrace=20 On Mon, Jan 17, 2011 at 10:37 AM, xclerc < xavier.clerc@inria.fr > wrote:= =20 The underlying problem is that "Printexc.print_backtrace" prints the backtr= ace=20 for the last exception raised... which can be one raised by "Printf.eprintf= " or=20 "Printexc.to_string", but locally caught and not exposed to the outside wor= ld.=20 Okay, that makes sense.=20 You will get different backtraces according to the value of "custom_printer= ".=20 I'm actually getting the same output (just "Not_found" printed). Tried nati= ve and byte code, on two different systems.=20 Based on your explanation, I was expecting the following to give different = output if you change true to false. But actually nothing is printed out in = any case. So I'm really unclear now as to what print_backtrace does. Are yo= u sure that you compiled the source with the "-g" option,=20 *and* set the OCAMLRUNPARAM environment variable to "b"?=20 Regards,=20 Xavier Clerc=20 ------=_Part_145238_292378349.1295283749745 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Times New Roman; font-size: 12pt; color: #000000'= >


De: "Ashish Agarw= al" <agarwal1975@gmail.com>
=C0: "xclerc" <xavier.clerc@= inria.fr>
Cc: "Caml List" <caml-list@inria.fr>
Env= oy=E9: Lundi 17 Janvier 2011 17:41:13
Objet: Re: [Caml-list] = printing an exception changes printed backtrace

On Mon, Jan 17, 2011 at 10:37 AM, xclerc <xavier.clerc@inria.fr= > wrote:
 
The underlying problem is that "Printexc.print_backtrace" prints the backtr= ace
for the last exception raised... which can be one raised by "Printf.= eprintf" or
"Printexc.to_string", but locally caught and not exposed to = the outside world.

Okay, that makes sense. 
 
You will get different backtraces according to the value of "custom= _printer".

I'm actually getting the same output (just= "Not_found" printed). Tried native and byte code, on two different systems= .

Based on your explanation, I was e= xpecting the following to give different output if you change true to false= . But actually nothing is printed out in any case. So I'm really unclear no= w as to what print_backtrace does.
Are you sure tha= t you compiled the source with the "-g" option,
*and* set the OCAMLRUNPA= RAM environment variable to "b"?


Regards,

Xavier Clerc
= ------=_Part_145238_292378349.1295283749745--