Re: whither stack traces?

Vesa Karvonen <vesa.karvonen-bbCR+/[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
Quoting Dave Herman <[email protected]>:
[...]
> I think I'm 95% of the way there. I can't completely reproduce the 
> behavior of the REPL's backtrace facility, since I don't know what is 
> used to print out information about the exception. The best I could 
> muster was:
> 
>      fun exnDetails (Fail s)  = SOME ("Fail: " ^ s)
>        | exnDetails Bind      = SOME "nonexhaustive binding failure"
>        | exnDetails Match     = SOME "nonexhaustive match failure"
>        | exnDetails Div       = SOME "divide by zero"
>        | exnDetails Domain    = SOME "domain error"
>        | exnDetails Overflow  = SOME "overflow"
>        | exnDetails Size      = SOME "size"
>        | exnDetails Subscript = SOME "subscript out of bounds"
>        | exnDetails _         = NONE

Did you try General.exnMessage:

  http://www.standardml.org/Basis/general.html#SIG:GENERAL.exnMessage:VAL

-Vesa Karvonen

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.