oxygen_728
asked on
MFC Exception Handling - What happens to an uncaught exception thrown in an event-handler?
If an event handler throws an exception, and it is not caught by a programmer-defined try/catch block, is the event canceled?
In all cases, only in some?
Thanks
In all cases, only in some?
Thanks
I think an unhandled exception will always result in the program crashing, not the event being canceled.
If the unhandled exception occurs in the event handler, the application crashes and the message won't be removed from the message queue.
sjith2000 - please read the comments by other experts first.
Hi AndyAinscow,
I am very glad to say that I had already seen the comment written by you.I also feel that the application will crash as you think.Also I feel that the message won't be removed from the message queue
I am very glad to say that I had already seen the comment written by you.I also feel that the application will crash as you think.Also I feel that the message won't be removed from the message queue
ASKER
Thanks for the comments thus far,
I have had my suspicions that the application would crash.
I hope to test it soon.
Thanks for the input
I have had my suspicions that the application would crash.
I hope to test it soon.
Thanks for the input
To duplicate a previous experts comment with referring to it is not polite (or useful) behaviour.
If you agree with a comment posted earler then why not say so.
eg.
Andy is correct, the app will crash.
If you agree with a comment posted earler then why not say so.
eg.
Andy is correct, the app will crash.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>>> I feel that the message won't be removed from the message queue
an exception is independent of the existence or non-existance of message queues. Exeption handling is realized by some kind of 'long jumps' along the call stack.
>>>> have had my suspicions that the application would crash.
What is the reason for your doubts. As Andy showed, it is simple to verify that unhandled exceptions lead to a crash.
Regards, Alex
an exception is independent of the existence or non-existance of message queues. Exeption handling is realized by some kind of 'long jumps' along the call stack.
>>>> have had my suspicions that the application would crash.
What is the reason for your doubts. As Andy showed, it is simple to verify that unhandled exceptions lead to a crash.
Regards, Alex