caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "lin hong" <lhong@amnh.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Re: exception error trace back in ocaml
Date: Tue, 22 Jun 2010 10:55:43 -0400 (EDT)	[thread overview]
Message-ID: <53601.216.73.250.47.1277218543.squirrel@webmail.amnh.org> (raw)
In-Reply-To: <slrni1vjvp.rk5.sylvain@gallu.homelinux.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.

Thank you for your reply.

I believe the "-g" flag is being used during compile though, for I can get
full traceback with other exception error in the code. This is the first
and only exception error without the full trace.

>
> 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
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>



  reply	other threads:[~2010-06-22 14:55 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
2010-06-22 14:55   ` lin hong [this message]
     [not found]   ` <12944_1277218550_o5MEtn0x008505_53601.216.73.250.47.1277218543.squirrel@webmail.amnh.org>
2010-06-22 15:17     ` [Caml-list] " 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=53601.216.73.250.47.1277218543.squirrel@webmail.amnh.org \
    --to=lhong@amnh.org \
    --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).