idea: try/catch and "rethrow"...?

Allen Wirfs-Brock allen at
Tue Feb 1 15:39:43 PST 2011

On Feb 1, 2011, at 1:42 PM, Mike Samuel wrote:

>> A debugger (or debugger infrastructure)  can capture stack trace information
>> and maintain an association between a stack trace info and specific thrown
>> objects.  Even if the object is thrown multiple times.  (BTW, this is
>> probably a good use of Ephemeron tables.).  This information could even be
> An ephemeron table can't associate a stack with a selfless value, so
> ephemeron tables don't close the non-Error value hole.
> One way to close it is to wrap the thrown value in an envelope that
> can carry stack info, and then associate that envelope with the catch
> block that handles the exception.  The base error class could just be
> a type that captures stack info at creation time and so doesn't need
> an envelope.

Actually, that's why I said "objects".  I'm much more sympathetic  about the utility of associating a stack traceback with an actual Error or <NativeError> object than I am with associating one with a thrown selfless value.

More information about the es-discuss mailing list