All - How can I tell / extract the name of the sub or function that is creating an error? I'd like to extract this so I can write an event and include the sub name in the error text without having to go to every error handling statement and adding the sub as a string.
Thanks,
Brian
Herfried K. Wagner [MVP] - 14 Aug 2005 09:09 GMT
"Brian P. Hammer" <bhammer@le "DASH" aviation.com> schrieb:
>All - How can I tell / extract the name of the sub or function that is
>creating an error? I'd like to extract this so I can write an event and
>include the sub name in the error text without having to go to every error
>handling statement and adding the sub as a string.
'MethodBase.GetCurrentMethod().Name'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Metallikanz! - 14 Aug 2005 10:59 GMT
Make use of the TargetSite and Source properties of the exception type to determine the method and the name of the app that caused the exception.
HTH, Metallikanz!
All - How can I tell / extract the name of the sub or function that is creating an error? I'd like to extract this so I can write an event and include the sub name in the error text without having to go to every error handling statement and adding the sub as a string.
Thanks,
Brian