caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* stack trace on exception in top-level
@ 2007-04-19 19:47 Sam Steingold
  0 siblings, 0 replies; only message in thread
From: Sam Steingold @ 2007-04-19 19:47 UTC (permalink / raw)
  To: caml-list

how do I get backtraces on exceptions in then top-level?
E.g.:

# let f x = invalid_arg (sprintf "error: %d" x) ;;
val f : int -> 'a = <fun>
# let g x = f (x+1) ;;
val g : int -> 'a = <fun>
# let h x = g (x+1) ;;
val h : int -> 'a = <fun>
# h 1;;
Exception: Invalid_argument "error: 3".

I want to see something like:
h called g on line 1
g called f on line 1
f raised invalid_argument on line 1

thanks.
Sam,



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-19 19:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-19 19:47 stack trace on exception in top-level Sam Steingold

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).