views:

283

answers:

1

Hello,

I have a global HandledExceptionHandler. In the catch part of my try catch block I would like to pass the fully qualifed method name where the exception occurred. How do you do that? Can it be done without reflection. HEre is an example of what I am looking for...

Public Sub MySub
   Try
      'some error happens

   Catch
      HandledException (ERROR_LOCATION, SOME_OTHER_ARGUMENT)
   End Try


End Sub

How do I get the ERROR_LOCATION in this case?

Seth

+5  A: 

If you have the exception object you can see use the TargetSite property to obtain the information about where the exception was thrown.

Colin Mackay