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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2BD3EBC57 for ; Tue, 22 Jun 2010 16:55:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As8BAGdrIEzYSfEMkWdsb2JhbACSPzCMKBUBAQEBCQsKBxEEHsFDhRsE X-IronPort-AV: E=Sophos;i="4.53,460,1272837600"; d="scan'208";a="53682428" Received: from info-smtp-004.amnh.org ([216.73.241.12]) by mail2-smtp-roc.national.inria.fr with ESMTP; 22 Jun 2010 16:55:44 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by info-smtp-004.amnh.org (Postfix) with ESMTP id 504C51CD56C for ; Tue, 22 Jun 2010 10:55:43 -0400 (EDT) X-Virus-Scanned: amavisd-new at amnh.org Received: from info-smtp-004.amnh.org ([127.0.0.1]) by localhost (info-smtp-003.amnh.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 48LQIXstlhlz for ; Tue, 22 Jun 2010 10:55:43 -0400 (EDT) Received: from webmail.amnh.org (dolce.amnh.org [216.73.241.32]) by info-smtp-004.amnh.org (Postfix) with ESMTP id 137C21CD568 for ; Tue, 22 Jun 2010 10:55:43 -0400 (EDT) Received: from 216.73.250.47 (SquirrelMail authenticated user lhong) by webmail.amnh.org with HTTP; Tue, 22 Jun 2010 10:55:43 -0400 (EDT) Message-ID: <53601.216.73.250.47.1277218543.squirrel@webmail.amnh.org> In-Reply-To: References: <55271.216.73.250.152.1277144142.squirrel@webmail.amnh.org> Date: Tue, 22 Jun 2010 10:55:43 -0400 (EDT) Subject: Re: [Caml-list] Re: exception error trace back in ocaml From: "lin hong" To: caml-list@inria.fr User-Agent: SquirrelMail/1.4.8-4.el4.centos MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam: no; 0.00; ocaml:01 amnh:01 amnh:01 traceback:01 traceback:01 ocaml:01 ocamlc:01 foo:01 re-raise:01 beginner's:01 bug:01 beginners:01 wrote:01 compile:01 compile:01 > On 21-06-2010, lin hong 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 >