Exception has been thrown by the target of an invocation.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Often when I use the reflection API I get an exception whose associated message is "Exception has been thrown by the target of an invocation.". What does this error message mean?
 
Whenever you use something like Member.Invoke(), if the called method throws
an exception, the runtime will wrap that exception inside of the exception
that you got. You can find the original except using the inner property (or
by calling ToString() on the exception).

--
Eric Gunnerson

Visit the C# product team at http://www.csharp.net
Eric's blog is at http://weblogs.asp.net/ericgu/

This posting is provided "AS IS" with no warranties, and confers no rights.
Michael Stiefel said:
Often when I use the reflection API I get an exception whose associated
message is "Exception has been thrown by the target of an invocation.".
What does this error message mean?
 
Back
Top