Re: Not able to catch exceptions
Again, we need Minimal reproducible example code.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
Well, this looks like VB.NET, not WinSCP question.
Consider asking it on Stack Overflow instead.
In any case, we/they will need to know more details (minimal reproducible example).
Try
transferResult = session.PutFiles(fileToSync, sp.RemotePath, False, transferOps)
transferResult.Check()
Catch ex As Exception
If m_logginglevel > 1 Then
WriteToEngineLog(MessageType.Information, "Error performing transfer: " & ex.message)