Tuesday, March 27, 2012

FTP No Files Error

When running FTP Client, and there are no files found on the FTP site and
error is thrown. Is there any way to catch this condition and reset the
error so does not bubble up to the parent package?

I want to catch the event that there are not files on the FTP server to get
so that I can set a variable appropriately, but then I want to branch on the
condition and return to the parent package and not have the parent package
see the error that was thrown.

Any suggestions?

Thanks, Mike

You can not catch this specific error condition.

You can control the execution result to be success, failure, or completion, but this will be the case always, not for specific errors only.

Thanks,
Mohammed.

|||Sorry forgot to mention how to control the execution result. You do that by setting the ForceExecutionResult property to the result you want (Success, Failure, or Completion)|||Thanks for the feedback. In the OnTaskFailed Event Handler, I would then like to be able to explicitly set the ForceExecutionResult = Completion. Is it possible to do this at this point? I have not be able to determine how to program this into my script that runs when this event occurs. Maybe this is just not possible.

My issue is that I have had to set the Max Error Count = 2 for the parent package that calls the FTP process to work past this issue. But then I have not way of determining if the error was due to the files not being there, or a legitimate error like the connection to the server could not be established.

I probably should put this on the wish list for an upcoming release.

Thanks, Mike.

No comments:

Post a Comment