Try Catch Template?

G

gregory_may

Anyone know how to add the subroutine/function name into a try catch block?
Ideally, it would be great to have this as part of the automatic template
that gets created.


Try
Catch ex As Exception
Debug.WriteLine(ex.ToString)
End Try
 
H

Herfried K. Wagner [MVP]

gregory_may said:
Anyone know how to add the subroutine/function name into a try catch
block? Ideally, it would be great to have this as part of the automatic
template that gets created.

'System.Reflection.MethodBase.GetCurrentMethod().Name' will return the
method's name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top