• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Errorhandling machinedependent

I noticed that some errors (floatingpoint exceptions) are catched by Windows (showing the exception dialog, and killing my app) on my laptop but not on my desktop. Even worse the exception shows only if a use a Release build.
This is anoying, because ofcourse it is a bug (in this case a initialisation bug resulting in a NAN converted to a long) but I would like to catch these bugs in my development enviroment (my desktop).
I wonder of installing a signal function would help, I doubt it (and not going to try it before I heard you're ideas) because the default signal handler aborts the program (sais the VC6 doc) but that doesn't happen. In fact on a desktop or debug build nothing happens at all! (the bug is ofcourse still there) Only with a release build on my laptop I get the exception.
Luc
0
LucHoltkamp
Asked:
LucHoltkamp
1 Solution
 
jhanceCommented:
I'm not sure what you're asking as the questionis kind of disorganized but if you want to catch a run-time error yourself rather than letting Windows handle it, use the:

SetUnhandledExceptionFilter()

function.  This in conjunction with:

TopLevelExceptionFilter()

will give you complete access to what happened and you can decide how to proceed.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now