Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: John Max Skaller <skaller@maxtal.com.au>
To: Patrick M Doane <patrick@watson.org>
Cc: Gerd Stolpmann <gerd@gerd-stolpmann.de>,
	Xavier Leroy <Xavier.Leroy@inria.fr>,
	Scott McPeak <smcpeak@cs.berkeley.edu>,
	caml-list@inria.fr
Subject: Re: how to set breakpoint at exception throw?
Date: Wed, 05 Jul 2000 00:43:06 +1000	[thread overview]
Message-ID: <3961F7FA.643D7863@maxtal.com.au> (raw)
In-Reply-To: <Pine.BSF.3.96.1000703110307.69771A-100000@fledge.watson.org>

Patrick M Doane wrote:
> 
> On Sat, 1 Jul 2000, Gerd Stolpmann wrote:
> 
> > Nevertheless, I have a wish: At least for programs compiled with the bytecode
> > compiler, an automatic backtrace of uncaught exceptions would be often helpful
> > (i.e I get a list where the last uncaught exception was raised, and all
> > locations where it is re-raised in the "with" clause of the "try" statement).
> > First, this type of error is very frequent, and it would save much time if the
> > location where the problem occurs were output from the failing program itself.
> > Second, under some environments it is difficult to run the debugger; not every
> > program is run from the command-line (CGI programs, for example). Furthermore,
> > such a feature would help bug searching in production environments: on such
> > machines, there is usually no debugger installed, and it is sometimes difficult
> > to reconstruct the failing data case.
> 
> I agree strongly that such a feature is needed for Ocaml development. I
> have lost a lot of time to tracking down these problems in the past and
> this is one of the few weak points in using the language right now.
> 
> Patrick

Hmmmm. I don't know how to do this in ocaml, but in C++ and Python it is
easy:
you create an exception one of whose components is the caught exception,
and throw it, thus preserving the whole exception chain. That is, you
can do
this in user space without special system support.

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net



  parent reply	other threads:[~2000-07-05 21:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-28 23:24 Scott McPeak
2000-06-30 13:08 ` Xavier Leroy
2000-07-01 12:57   ` Gerd Stolpmann
2000-07-03 15:05     ` Patrick M Doane
2000-07-03 21:43       ` Norman Ramsey
2000-07-06  3:05         ` Michael Hohn
2000-07-04 14:43       ` John Max Skaller [this message]
2000-07-04 18:19         ` Gerd Stolpmann
2000-07-05 22:13           ` Jean-Christophe Filliatre
2000-07-06  1:26           ` Max Skaller
2000-07-06 11:23           ` Daniel de Rauglaudre
2000-07-05  1:28   ` Scott McPeak
2000-07-05 21:29 Don Syme

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=3961F7FA.643D7863@maxtal.com.au \
    --to=skaller@maxtal.com.au \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=gerd@gerd-stolpmann.de \
    --cc=patrick@watson.org \
    --cc=smcpeak@cs.berkeley.edu \
    /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