Developer forum

Forum » Ecommerce - Standard features » Data Integration - Check if source file exists, rather than throwing exception

Data Integration - Check if source file exists, rather than throwing exception

Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

If a source file does not exist when a Data Integration job is executed, a FileNotFoundException is thrown. There can be a perfectly good reason for a source file not to exist at the point of time where a scheduled task executes a DI job.

So rather than catching a missing file with an exception, make a simple File.Exists check, and log it nicely as a Warning.


Replies

 

You must be logged in to post in the forum