title: How to catch errors while executing VB Project using NANT?
body: <p>We are executing all the VB projects using below NANT script:Just example</p>
  
  <pre><code>&lt;target name="VBCompile" &gt;
  &lt;property name="failure.reason" value="VBCompile" /&gt;
  &lt;trycatch&gt;
  &lt;try&gt;
  &lt;foreach item="File" property="FileName" in="${VBProj.dir}"&gt;
  &lt;echo message="Creating Dll from: $:{FileName}" /&gt;
  &lt;exec basedir=${VBProj.dir} program=${VB6.exe} commandline=/MAKE ${FileName} outdir ${VBDll.dir}
  &lt;/foreach&gt;
  &lt;/try&gt;
  &lt;catch&gt;
  &lt;fail message="${failure.reason}"/&gt;
  &lt;/catch&gt;
  &lt;finally&gt;
  //..some codes
  &lt;/finally&gt;
  &lt;/trycatch&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>I want the scenario if we encountered some error while executing all VB projects, it should display the errors in Command Prompt itself and i don't want the error message to be dispalyed as alerts.
  I have tried using  and ${failure.message}.Not working for me :( Please suggest any solution.</p>