From: Morgan Fox on
I am running a for loop which analyzes all files in a folder. Some of the files have messy data and return an error. Rather than go through and manually figure out which ones don't work, is there a way for the code to simply recognize the error and move on to the next file?

Thanks.
From: dpb on
Morgan Fox wrote:
> I am running a for loop which analyzes all files in a folder. Some of
> the files have messy data and return an error. Rather than go through
> and manually figure out which ones don't work, is there a way for the
> code to simply recognize the error and move on to the next file?

doc catch
doc try

--
From: Walter Roberson on
Morgan Fox wrote:
> I am running a for loop which analyzes all files in a folder. Some of
> the files have messy data and return an error. Rather than go through
> and manually figure out which ones don't work, is there a way for the
> code to simply recognize the error and move on to the next file?

Possibly: if it fails out using error() then you can detect that and continue
gracefully using a try/catch block.