Backtrace in exceptions

Sean Kelly sean at f4.ca
Mon Aug 7 08:22:32 PDT 2006


Serg Kovrov wrote:
> Some time ago Shinichiro.h has posted Phobos modification implementing
> backtrace in exceptions. Shinichiro.h intended this to be part of Phobos
> and Walter seems was pleased with it.
> 
> And then discussion thread just stopped... Is this changes got to
> Phobos?

I don't think it's been added yet.

> If yes, how to use exception tracing?

Just run a debug build.

I'll admit the way the stack trace is generated for this mod is a bit 
weird, though it may be a necessary part of how Win32 support works.  To 
generate the trace, the try/catch block in dmain2 is not used.  Instead, 
the exception is thrown all the way out of the application, and the 
trace is generated by some special handler as the app exits.  I'd like 
to believe it would be possible to generate the trace at the throw point 
or as the exception propagates instead.


Sean



More information about the Digitalmars-d mailing list