I am trying to create some sort of error catching method that will return the error line number. We have an abort email that is sent out when a process aborts that gives us the
Try
Dim x As Integer
x = " "
Catch ex As Exception
Dim trace = New Diagnostics.StackTrace(ex, True)
Dim line As String = Strings.Right(trace.ToString, 5)
Dim nombreMetodo As String = ""
Dim Xcont As Integer = 0
For Each sf As StackFrame In trace.GetFrames
Xcont = Xcont + 1
nombreMetodo = nombreMetodo & Xcont & "- " & sf.GetMethod().ReflectedType.ToString & " " & sf.GetMethod().Name & vbCrLf
Next
MessageBox.Show("Error en Linea number: " & line & ex.Message & vbCrLf & "Metodos : " & vbCrLf & nombreMetodo)
End Try