R
RalphTheExpert
This thread is a continuation of a thread with the Subject "Unhandled
exception - Different under debugger and non-debugger".
(http://www.dotnetnewsgroups.com/newsgroupthread.asp?ID=186902)
Oleg and Carl:
Carl wrote: "I would think the only fully sanitary, guaranteed to work
way would be to either terminate the program from inside the handler, or
intern the exception in an object and pass (a pointer to) that object
through a WM_APP window message where your message loop can unwrap it
and re-throw or otherwise handle the exception."
I’m pretty good when it comes to MFC and WTL. I am just learning how to
use the .Net environment and, frankly, there is a whole new gestalt here
that I’m missing. I am clueless as to whether a message pump even exists
in this environment. I’m guessing that there probably is and it has
been buried deep so that mere mortals don’t have to mess with it.
So, Oleg, my question to you is, “Does what Carl suggests solve the
problem?” If it does, what’s the right way to do it?
Fleshing out Carl’s remark, I assume that the proper way to do what he
says is to do a RegisterWindowMessage to get a unique message number and
to post a message. My problem is that I am clueless as to how to code a
handler to process the message.
Another question to you, Oleg, is that the article you cited
(http://support.microsoft.com/default.aspx?scid=kb;en-us;836674) seems
to be talking about this in terms of SEH rather than C++ exceptions.
Another point of confusion that I have is that the article you cited
says “In Visual Studio .NET 2003, click Application Configuration File
under Template, and then click Open”. Well, I’m running 2003 and there
is no Application Configuration File under Template. There’s a resource
template icon but no “XML file” under it. Sigh.
I followed the procedure under 2002 (even though I’m running 2003). I
followed those instructions and, as far as I can tell, there are no
behavioral differences. Sigh.
I haven’t tried MS’s “Another workaround for this problem is to use the
Application.OnThreadException handler” because I don’t understand what
they’re trying to accomplish.
exception - Different under debugger and non-debugger".
(http://www.dotnetnewsgroups.com/newsgroupthread.asp?ID=186902)
Oleg and Carl:
Carl wrote: "I would think the only fully sanitary, guaranteed to work
way would be to either terminate the program from inside the handler, or
intern the exception in an object and pass (a pointer to) that object
through a WM_APP window message where your message loop can unwrap it
and re-throw or otherwise handle the exception."
I’m pretty good when it comes to MFC and WTL. I am just learning how to
use the .Net environment and, frankly, there is a whole new gestalt here
that I’m missing. I am clueless as to whether a message pump even exists
in this environment. I’m guessing that there probably is and it has
been buried deep so that mere mortals don’t have to mess with it.
So, Oleg, my question to you is, “Does what Carl suggests solve the
problem?” If it does, what’s the right way to do it?
Fleshing out Carl’s remark, I assume that the proper way to do what he
says is to do a RegisterWindowMessage to get a unique message number and
to post a message. My problem is that I am clueless as to how to code a
handler to process the message.
Another question to you, Oleg, is that the article you cited
(http://support.microsoft.com/default.aspx?scid=kb;en-us;836674) seems
to be talking about this in terms of SEH rather than C++ exceptions.
Another point of confusion that I have is that the article you cited
says “In Visual Studio .NET 2003, click Application Configuration File
under Template, and then click Open”. Well, I’m running 2003 and there
is no Application Configuration File under Template. There’s a resource
template icon but no “XML file” under it. Sigh.
I followed the procedure under 2002 (even though I’m running 2003). I
followed those instructions and, as far as I can tell, there are no
behavioral differences. Sigh.
I haven’t tried MS’s “Another workaround for this problem is to use the
Application.OnThreadException handler” because I don’t understand what
they’re trying to accomplish.