View Single Post
Old 05-12-2004, 11:52 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,749
How can I continue the build on failure and capture the failure information?

First, select the Continue building radio button on the More tab of the Step Properties dialog so that the build will continue if the step fails.

For processing the failure info:

Option #1: Check the Build failure steps option and capture or process the failed step info in steps of the Failure Steps pane (you can specify which failure steps to build on the General tab or leave blank to build all failure steps). The failure step object will be available in the FailedStep object, and the FAILSTEP_OUTPUT system macro will contain the failed step's output.

Option #2: Uncheck the Build failure steps checkbox and capture or process the failed step info in the vbld_StepDone script event. When a step marked to ignore failure completes, the Step.BuildStatus property will contain the success/failure status of the step, and the LASTSTEP_OUTPUT system macro will contain the step's output. In the step's vbld_StepDone script event, call a script function to check the status and append the information for use at the end of the build (for instance, to send in an email message). The attached sample demonstrates this.

Note: The step properties and script event code can be edited for multiple steps at once by multi-selecting the steps and editing the step properties.
Attached Files
File Type: bld failed_steps.bld (4.2 KB, 2012 views)
Reply With Quote