0

Sometimes, apparently on Windows XP, when something goes wrong with my app, Windows tries to help showing a "Send error report" dialog.

But to find out the real error it would be better for me to see the actual error message. Is there any configuration or log that I can look at to see what´s the error?

Ricardo Acras
  • 35,784
  • 16
  • 71
  • 112
  • This happens because your app raises an exception that is not handled. It's best to catch this in your application. Without knowing any details of how your app is implemented, it's impossible to tell you how to do that. – David Heffernan Oct 11 '12 at 12:24
  • There are lots of places that could be raising the exception. I need the message to find that place and catch the exception. – Ricardo Acras Oct 11 '12 at 12:29
  • Indeed you do. But my comment still stands. You want a top level exception handler. I can't tell you how to implement it because I know nothing about your app. – David Heffernan Oct 11 '12 at 12:30
  • But, in some versions (or configuration sets) of windows it shows the actual message, and not the report error dialog. – Ricardo Acras Oct 11 '12 at 12:33
  • It depends on how Windows Error Reporting is configured on that machine. I don't understand why you want your program to die with unhandled exceptions. Your meant to want that not to happen! – David Heffernan Oct 11 '12 at 12:38
  • I think I´m not being clear here. I neeed that message to find the place where the problem is and handle it. Unfortunately I´m not able to have a top level exception handler. – Ricardo Acras Oct 11 '12 at 13:33
  • If you can't change your program then you'll need to change the global configuration of the target machine. Can you do that? – David Heffernan Oct 11 '12 at 13:40

1 Answers1

1

An old copy of NTSD is installed by default with Windows XP. You can set the following registry keys

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger 

to call ntsd. It will catch all unhandled exceptions. IIRC, it is where DrWatson use to live.

Here is a detailled how-to that will save the dump to a file. I prefer that method, but you can also have the debugger start an interactive session.

This SO question is similar.

Community
  • 1
  • 1
ixe013
  • 9,559
  • 3
  • 46
  • 77