From: Ashish Agarwal <agarwal1975@gmail.com>
To: Xavier Clerc <xavier.clerc@inria.fr>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] printing an exception changes printed backtrace
Date: Mon, 17 Jan 2011 12:12:36 -0500 [thread overview]
Message-ID: <AANLkTiko4CQdFCxJgc4PMvyiSEtf5bZhcY7MqtVd2qRA@mail.gmail.com> (raw)
In-Reply-To: <560327307.145239.1295283749745.JavaMail.root@zmbs4.inria.fr>
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
Oops. Forgot about OCAMLRUNPARAM. Both your and my example work now. Okay,
this resolves the issue in some sense; you have to be careful about
exceptions being raised that you don't see. Thanks for the explanations.
On Mon, Jan 17, 2011 at 12:02 PM, Xavier Clerc <xavier.clerc@inria.fr>wrote:
>
>
> ------------------------------
>
> *De: *"Ashish Agarwal" <agarwal1975@gmail.com>
> *À: *"xclerc" <xavier.clerc@inria.fr>
> *Cc: *"Caml List" <caml-list@inria.fr>
> *Envoyé: *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
>> backtrace
>> 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 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 you sure that you compiled the source with the "-g" option,
> *and* set the OCAMLRUNPARAM environment variable to "b"?
>
>
> Regards,
>
> Xavier Clerc
>
>
[-- Attachment #2: Type: text/html, Size: 2842 bytes --]
prev parent reply other threads:[~2011-01-17 17:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 21:15 Ashish Agarwal
2011-01-14 21:59 ` Daniel Bünzli
2011-01-14 22:05 ` Ashish Agarwal
2011-01-17 15:37 ` xclerc
2011-01-17 16:41 ` Ashish Agarwal
2011-01-17 17:02 ` Xavier Clerc
2011-01-17 17:12 ` Ashish Agarwal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTiko4CQdFCxJgc4PMvyiSEtf5bZhcY7MqtVd2qRA@mail.gmail.com \
--to=agarwal1975@gmail.com \
--cc=caml-list@inria.fr \
--cc=xavier.clerc@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox