caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alessandro Baretta <a.baretta@barettadeit.com>
To: Nicolas Cannasse <ncannasse@motion-twin.com>
Cc: skaller <skaller@users.sourceforge.net>, caml-list@inria.fr
Subject: Re: [Caml-list] Seeking exception source
Date: Tue, 08 Nov 2005 11:30:08 +0100	[thread overview]
Message-ID: <43707E30.2040405@barettadeit.com> (raw)
In-Reply-To: <001e01c5e443$c7259d40$0c05a8c0@PWarp>

Nicolas Cannasse wrote:
>> I am occasionally annoyed by Not_found propagating to my
>> top level function .. meaning the error could be anywhere
>> at all in my program.
> 
> 
> At that time the best is to run your program in bytecode with debug 
> infos using ocamlrun -b so you'll get full backtrace informations. It 
> would be better for such debug informations (not all the types but only 
> the bytecode -> source positions) to be included by default, and always 
> have backtrace turned on.

In many cases this is completely inadequate. The AS/Xcaml application 
server, for example, cannot terminate on an uncaught exception in a 
program module. The main loop must catch the exception and do its best 
to report it, without aborting the execution of the server. This means 
that I need to get the backtrace within Ocaml code by applying some kind 
of function to the exception object. I tried to write a C function 
providing this kind of information, but I never managed to get it to work.

Alex


  reply	other threads:[~2005-11-08  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08  2:13 skaller
2005-11-08  2:57 ` [Caml-list] " Jon Harrop
2005-11-08  9:06 ` Nicolas Cannasse
2005-11-08 10:30   ` Alessandro Baretta [this message]
2005-11-08 10:06     ` Nicolas Cannasse
2005-11-08 10:34       ` skaller

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=43707E30.2040405@barettadeit.com \
    --to=a.baretta@barettadeit.com \
    --cc=caml-list@inria.fr \
    --cc=ncannasse@motion-twin.com \
    --cc=skaller@users.sourceforge.net \
    /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).