I'm having a really weird issue with not being able to trap exceptions, specifically with PutFiles() in vb.net. I have my application working but when their is an error thrown by transferOperationResult.Check() it procedes to the catch block but when i try and display the error with the following code, it errors out again.
transferResult = session.PutFiles(fileToSync, sp.RemotePath, False, transferOps)
Catch ex As Exception
If m_logginglevel > 1 Then
WriteToEngineLog(MessageType.Information, "Error performing transfer: " & ex.message)