From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Gerd Stolpmann <gerd@gerd-stolpmann.de>
Cc: John Max Skaller <skaller@maxtal.com.au>,
Patrick M Doane <patrick@watson.org>,
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: Thu, 6 Jul 2000 13:23:00 +0200 [thread overview]
Message-ID: <20000706132300.S17898@jaune.inria.fr> (raw)
In-Reply-To: <0007042058420E.14914@ice>; from gerd@gerd-stolpmann.de on Tue, Jul 04, 2000 at 08:19:20PM +0200
Hello,
On Tue, Jul 04, 2000 at 08:19:20PM +0200, Gerd Stolpmann wrote:
> Uncaught exception: Not_found
> Exception backtrace:
> - File x, line 3: Not_found
> - File x, line 7: Not_found
> - File x, line 11: Not_found
Can't camlp4 help you?
========================================= file toto.ml
open Pcaml
EXTEND
expr: LEVEL "apply"
[ [ "myraise"; e = expr LEVEL "simple" ->
let bp = <:expr< $int:string_of_int (fst loc)$ >> in
let ep = <:expr< $int:string_of_int (snd loc)$ >> in
<:expr< raise (LocExc $e$ $str:!input_file$ ($bp$, $ep$)) >> ] ]
;
END
=========================================
$ ocamlc -pp "camlp4o pa_extend.cmo q_MLast.cmo" -I `camlp4 -where` -c toto.ml
========================================= file foo.ml
exception LocExc of exn * string * (int * int)
try
try
myraise Not_found
with
x ->
(* XXX: Clean-up code here *)
myraise x
with
x ->
(* XXX: Clean-up code here *)
myraise x
=========================================
$ ocamlc -c -pp "camlp4o ./toto.cmo" foo.ml
$ camlp4o ./toto.cmo pr_o.cmo foo.ml
exception LocExc of exn * string * (int * int);;
try
try raise (LocExc (Not_found, "foo.ml", (63, 80))) with
x -> raise (LocExc (x, "foo.ml", (139, 148)))
with
x -> raise (LocExc (x, "foo.ml", (199, 208)));;
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
next prev parent reply other threads:[~2000-07-07 14:33 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
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 [this message]
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=20000706132300.S17898@jaune.inria.fr \
--to=daniel.de_rauglaudre@inria.fr \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=gerd@gerd-stolpmann.de \
--cc=patrick@watson.org \
--cc=skaller@maxtal.com.au \
--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