Wednesday, October 21, 2009 5:42 AMhi all
I have added AppDomain.CurrentDomain.UnhandledException event ,but it can't catch the unhande exception.
so how to catch the unhande exception in add-in ?
Wednesday, October 21, 2009 7:41 AM
My addin is a wpf control, and host at elementHost.
Thursday, October 22, 2009 7:46 AMModeratorHello Daniel,
For unhandled exception, this issue has been discussed in this forum many times. Search this forum with key string "unhandled exception", and you will see a couple of threads. In general, you will get this answer form this thread: Catching Unhandled Exceptions and this link.
You could use try/catch block to catch this exception.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
- Marked As Answer by Bessie ZhaoModerator Wednesday, October 28, 2009 2:06 AM
Friday, November 12, 2010 6:01 PMThis is correct in most cases, however, if the Outlook Add-In is a VSTO Add-In, then you need to implement the above to catch unhandled exceptions that come from any dialogs you may have however, MOST unhandled exception will be caught by the VSTO "shim". I don't know of a way to catch those before VSTO does, except to catch the exception as close to the point of origination as possible, at which point it no longer becomes an unhandled exception :)