Denis Koroskin Wrote:
> 
> I modified druntime to support stack-tracing for all kind of exceptions.  
> It's very simple:
> 
> 1) In object_.d, change traceContext() function linkage to C:
> extern(C) Throwable.TraceInfo traceContext(void* ptr = null) { ... }
> 
> 2) In rt\deh.c, declare
> Interface* traceContext(void* ptr);
> 
> and add the following line to _d_create_exception_object (rt\deh.c)
> exc->info = traceContext(NULL);
> 
> that's it. Works like a charm!

Pretty slick.  I've been thinking about generating traces when the throw occurs 
instead of when the exception is constructed, and this change allows that as 
well.  I'll add it to the queue.

Reply via email to