Exception by target of an invocation

April 1, 2010

Parallel Programming means that we use invocations more often than we did before. Visual Studio 2008 debugger will bring you to the correct line if you get an exception, but if you invoke a method within your own code the debugger will show you the location in your own thread, which means the line that invoked the code that eventually threw an exception. The exception would say "Exception has been thrown by the target of an invocation.". To solve this and really find the location of your exception you can drill down into the inner-exception member of the exception or...