views:

152

answers:

1

Hi

I am writing a NAnt build script which is responsible for deploying some files to an iss server. As part of this I would like to add error handling to my scripts - something which I haven't used before.

Introducing error handling inevitably leads to thoughts about the structure of the build file(s). I think of structure as the grouping of logic in targets and the dependencies between these.

In NAntContrib I have found the task which should make the job easier than the standard "onfailure" property. Unfortunately its only possible (at least for me) to find short and fairly simple examples of its usage. What I need is recommendations on how to make an entire file structure that handles errors for the more complex scenarios.

Please post your thoughts and examples regarding this issue.

Thanks

+1  A: 

Not sure if this helps but how about using the try/catch blocks instead around any fragile code?

http://nantcontrib.sourceforge.net/release/0.85/help/tasks/trycatch.html

Paul