exnHistory (was Re: another feature request)

Stephen Weeks MLton@sourcelight.com
Wed, 19 Sep 2001 16:46:14 -0700


> I  thought  about this kind of thing a while ago, but a problem comes up with
> code like dynamic-wind kind of things.  It is going to handle any  thing  and
> then  re-raise  it.   Getting  a  stack  trace  that  doesn't  go  past it is
> undesirable.  I thought of some hacks that would handle most cases,  but  not
> everything.

Either raise resets the history to [] on the exn being raised or it leaves the
history alone.  If it leaves the history alone (a bit scary because of space
leaks), then only the handler that did the dynamic wind will be missing from the
history.  We could provide a way to set the history to patch that.  Another
possibility would be to provide a special version of raise that didn't reset the
history.

BTW Norman, feel free to let us know if you don't want to be on this thread, and
just want to hear a summary of our decisions.