another feature request
Stephen Weeks
MLton@sourcelight.com
Wed, 19 Sep 2001 15:24:34 -0700
> One hates to see the extra cost on a handle expression, but it can be
> very difficult to diagnose these uncaught exceptions. A compile-time
> option might be suitable (with default to diagnose).
The cost is only when the handler runs, not when it is installed, so it
shouldn't be that bad. Also, MLton's whole-program optimization might even get
rid of the string list ref for programs that don't use SMLofNJ.exnHistory. In
any case, it's easy to add the compile-time bool that controls whether or not
handlers muck with the field. Although, I would probably make the default be to
not muck.
> I have just sent a mail message with an uncaught exception. I hope it
> is in your code and not mine, but it's not entirely clear to me...
It's definitely a MLton bug (or bugs!). I'll send more shortly.