Hi all,

I loop on a fileset and use antcall to call a target for each file. Processing file tasks can fail. I use the Ant-Contrib trycatch task to make some alternative processing and customize error messages in my catch section whenever one task fails (<fail message="..." /> . I'd like to include the file name in my fail message (@{file} doesn't work).
Does anybody knows how I could do that ?



      <trycatch property="processing.file.error">
         <try>
            <for param="file">
               <path>
                  <fileset dir="myfiles">
                     <include name="**/*.ext" />
                  </fileset>
               </path>
               <sequential>
                  <antcall target="process_file">
                     <param name="file.path" value="@{file}" />
                  </antcall>
               </sequential>
            </for>
         </try>
         <catch>
            ...
<fail message="Error processing file ${i.d.like.th.file.name.here} " />
         </catch>
      </trycatch>

--
A. ROY

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to