Hi Robin ,
Thank you for sharing your idea with Rodrigo!
I agree with most of your comment. Based on my experience, there are 2
types of exceptions/errors in application, one is expected and one is
unexpected. Expected error(such as file not found etc..) is known to the
developers, so it would be safe to gracefully recover from this error and
let the application continue to run without closing. In the unexpected
error scenario, I think it may be better to close the application, since
developers know nothing of this error, it may be hardware error, memory
insufficiency or even memory corruption, so it may be unsafe to run from
this situation. The recommended solution in this scenario may be closing
the entire application. Also, this is default behavior of Win32 unhandled
exception filter in NTDLL.
Additionally, Rodrigo, you may also use Application.Exit() method to close
the entire applicatin if you think it is suitable. This will correctly
inform all message pumps that they must terminate, and then close all
application windows after the messages have been processed based on the
MSDN. So I assume this method may meet your need.
Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.