caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: Re: exception error trace back in ocaml
Date: Mon, 21 Jun 2010 20:47:53 +0000 (UTC)	[thread overview]
Message-ID: <slrni1vjvp.rk5.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <55271.216.73.250.152.1277144142.squirrel@webmail.amnh.org>

On 21-06-2010, lin hong <lhong@amnh.org> wrote:
>
> I have problem getting a full traceback of some exception error. The
> traceback looks like this:
>
> Fatal error: exception Invalid_argument("index out of bounds")
> Raised at file "camlinternalLazy.ml", line 33, characters 10-11
> Called from file "list.ml", line 74, characters 24-34
>
> But that's all I got, both camlinternalLazy.ml and list.ml are ocaml
> source code, I still don't know which part of my code trigger it. Also, in
> camlinternalLazy.ml line 33, there is a "try .... with e -> raise e", is
> this the reason I don't have a full traceback -- Maybe something else
> catch the "raise e" ?  Any idea?
>

To get the full trace, you need to compile your code with "-g", i.e.
ocamlc -g foo.ml 

If you don't have this debug flag, you won't see calls from the code you
compiled.

The "try ... with e -> raise e" just re-raise the exception and you will
be able to see it in the full trace.

Regards,
Sylvain Le Gall


  reply	other threads:[~2010-06-21 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 18:15 lin hong
2010-06-21 20:47 ` Sylvain Le Gall [this message]
2010-06-22 14:55   ` [Caml-list] " lin hong
     [not found]   ` <12944_1277218550_o5MEtn0x008505_53601.216.73.250.47.1277218543.squirrel@webmail.amnh.org>
2010-06-22 15:17     ` Eric Cooper

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=slrni1vjvp.rk5.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).