The blog has moved to a new address. The blog is now located at http://devintelligence.com

Adsense

Wednesday, July 19, 2006

Why doesn’t the debugger catch exceptions in webBrowser events?


Since the core of the managed WebBrowser is an unmanaged ActiveX control, it captures all exceptions thrown in its methods before they can be passed to the debugger. This can lead to unusual behavior if you are not catching the exceptions before they leave the method. For this reason it is highly recommended that try catch blocks should be placed around the contents of all WebBrowser methods during the development and test phases, with special attention paid to procedures that could potentially throw exceptions.




Technorati : , ,

No comments: