How do I find the complete execution path of the following code structure?
Here ex.stacktrace will show only as far as MyDatabase.Connect rather than MyClass.DBConnect, how do I get the complete calling path?
Code:
Class MyClass
DBConnect()
Function DBConnect()
Try
MyDatabase.Connect()
Catch ex as MyCustomException
SendErrorEmail(MyDatabase.DBError())
End Try
End Function
Function SendErrorEmail(ByVal AppException as Exception)
[COLOR=red]' What to email???
AppException.Message
AppException.StackTrace[/color]
End Function
End Class
------------------------------------------------------------
Class MyDatabase
Private _DBError As Exception
Public ReadOnly Property DBError() As Exception
Get
Return _DBError
End Get
End Property
Function Connect()
Try
' Do connection stuff
Catch ex as Exception
_DBError = ex
End Try
End Function
End Class
Here ex.stacktrace will show only as far as MyDatabase.Connect rather than MyClass.DBConnect, how do I get the complete calling path?