Reputation: 13086
I've a 64bit system with Win7 and I use VS2010 with .Net Framework 4.0.
In a Winform application I get an Exception from a third-party component, I'm trying to catch this exception with a Try-Catch but it doesn't work!
Why?
UPDATE
If I un-check CLR Exceptions It works properly but I'm forced to check it due to this known problem: Why the form load can't catch exception?
If I press F10 it continues entering in catch statement!!
Upvotes: 4
Views: 306
Reputation: 8502
Have you got the following setting unchecked:
Break when exceptions cross AppDomain or managed/native boundaries (Managed only)
in your Tools->Options->Debugging->General tab for Visual Studio 2010
Its explained in MSDN here
Upvotes: 0
Reputation: 3439
Seems that you are using calling an unmanaged dll here. Try catching this exception using ExternalException Class. This may work for you but once you've gone outside of the .NET runtime's control, it's entirely up to the unmanaged code; there's nothing the .NET runtime can do.
Upvotes: 1