I am trying to write any errors out our users receive in a vb.net application to a log file and I was wondering if there is any way to catch JIT errors and if so what is the code to do this?
Based on what nbk is saying, you could do something like this
Private Sub LogEx()
'Some stuff that will fail
Catch ex As Exception
Private Sub LogException(ByVal Username As String, Ex As String)
Dim LogFilePath As String = My.Computer.FileSystem.SpecialDirectories.Desktop & "\MyLog.txt"
Dim MyLogFile As IO.StreamWriter =
My.Computer.FileSystem.OpenTextFileWriter(LogFilePath , True)
MyLogFile.WriteLine(Username & "---" & Ex)