[MLton-user] Exception history

Stephen Weeks sweeks@sweeks.com
Sun, 2 May 2004 15:54:26 -0700


> I think I'm missing something obvious.  I've enabled exception history
> with -exn-history true while compiling, but am only seeing one level in
> the history (the lowest, which is not a top-level function).  How do I get
> a full stack trace?

You're not missing anything.  Unfortunately, It's not currently
possible to get a full stack trace.  With -exn-history true, you get a
trace of all of the places where the exception was raised or re-raised
by intervening handlers.  That often skips lots of stack frames (for
functions that don't install a handler).

Hmmm, it occurs to me that we could tweak the compiler so that when
you compile -exn-history true, every function is forced to install a
dummy handler, so that we can get a more precise history.  I'll think
about it for a future release.