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 = ""
For Each sf As StackFrame In trace.GetFrames
nombreMetodo = sf.GetMethod().Name & vbCrLf
Next
MessageBox.Show("Error en Linea number: " & line & vbCrLf & ex.Message & vbCrLf & "Metodos : " & nombreMetodo)
End Try