Get the error encountered in Asynchronous Upload

0 votes
asked Mar 17, 2015 by maynero (390 points)

Using the solution I got here to upload file simultaneously.

In the array of task, how will I know which specific task encountered error?

Sftp sftp = new Sftp();
sftp.Login(username, password);

Task[] tasks = new Task[2];
tasks[0] = sftp.PutFileAsync(@"c:\file.txt", ".");
tasks[1] = sftp.PutFileAsync(@"c:\file2.txt", ".");
tasks[2] = sftp.PutFileAsync(@"c:\file3.txt", ".");


For above example, how will I know if which task encountered an error (error that does is not included in Rebex.IO.TransferProblemType)?

Applies to: Rebex SFTP

1 Answer

0 votes
answered Mar 17, 2015 by Tomas Knopp (58,890 points)
selected Mar 17, 2015 by maynero
Best answer

I guess this has been already discussed at stackoverflow.