FtpDLX.NET Error Handling - WeOnlyDo Discussion board

FtpDLX.NET Error Handling (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Erich, Tuesday, November 27, 2012, 00:06 (4161 days ago)

I have a question about handling errors with the ftpDlx.net product. The documentation (e.g. for the PutFile method) says this:

If an error occurs during transfer, Done event will be fired immediately containing Args.Error with description for the error, and transfer will be aborted.

The docs don't mention anything about exceptions, but I do get exceptions when the Blocking property is set to TRUE.

Is catching exceptions enough to cover all error cases or should I also check the LastError property? (i.e. are there any errors that will NOT throw an exception when Blocking is TRUE)

Thanks!

Re: FtpDLX.NET Error Handling

by woddrazen, Tuesday, November 27, 2012, 09:41 (4161 days ago) @ Erich

Hi Erich,


If you are using Events you can check for an error inside Connected and Done Event. Blocking Property is set to False in this case.

In Blocking mode error will be received immediately on line where it occur. LastError Property holds info about last error that occur. So if you catch it there you don't need to use LastError Property.

Hope this helps.


Regards,
Drazen