digitalmars.D - Backtrace in exceptions
- Serg Kovrov (7/7) Aug 07 2006 Some time ago Shinichiro.h has posted Phobos modification implementing
- Sean Kelly (11/18) Aug 07 2006 Just run a debug build.
- BCS (3/30) Aug 07 2006 I have some projects with one of these in each function.
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? If yes, how to use exception tracing? -- serg.
Aug 07 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
Aug 07 2006
Sean Kelly wrote:Serg Kovrov wrote:I have some projects with one of these in each function. debug scope( failure ) writef("Backtrace "__FILE__"(",__LINE__,")\n");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
Aug 07 2006