|
Subject:
|
Reflection
|
|
Posted By:
|
ffbalota
|
Post Date:
|
12/30/2003 12:38:54 PM
|
Hi,
I'm invoking a method of a class using reflection and in this method I'm trying thrown an exception with an specifc message but the exception message in the caller of this method is always "Exception has been thrown by the target of an invocation."
Thank's
Fabio Ferreira Balota
|
|
Reply By:
|
Ankur_Verma
|
Reply Date:
|
1/3/2004 7:06:20 AM
|
You are getting that exeption message becuase thats actually the exeption messagse. Its indeed the target of invocation that has thrown the exception. If you want to access the message that you threw with your exeption you can do that with the InnerException property like this.
catch(Exception ex) { Console.WriteLine(ex.InnerException.Message);
Ankur Verma .Net and C++ Specialist Wiley Tech Support
|
|
Reply By:
|
ffbalota
|
Reply Date:
|
1/8/2004 2:07:13 PM
|
Tank you Ankur!!!
Fabio Ferreira Balota
|