[Haskell-cafe] Exceptions

John Meacham john at repetae.net
Mon Oct 4 17:57:48 EDT 2004


On Mon, Oct 04, 2004 at 09:30:22AM +0100, Simon Peyton-Jones wrote:
> Actually GHC does exactly that when you compile with -prof -auto-all.
> Then if you run with +RTS -xc, you get a backtrace of sorts.  (I have
> not tested this recently!)  The backtrace is not yet reified into a data
> structure that can be examined, but that'd be quite doable if someone
> wanted to try.

A major problem with this that I notice is that it dumps the stack
whenever any exception is raised, which is a big pain if your program
does IO and regularly raises and catches exceptions as part of normal
operation. A big improvement would be to only dump the backtrace if the
exception was uncaught and caused the program to abort. 
        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ 


More information about the Haskell-Cafe mailing list