View Single Post
  #6  
Old 10-22-2005, 04:17 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
The LASTSTEP_STATUS macro will contain the build status of the last completed step (the last step in a subroutine when returning from a subrouting). If your subroutine has multiple steps marked to ignore failure and you want to know if any of them failed to build, there are a couple ways to approach it:

1) After the Subroutine Call step, add a Run Script step that uses the VBP object model to locate the subroutine and check the BuildStatus property of each step.

2) In the vbld_StepDone script event of each step within the subroutine, check the Step.BuildStatus property and create/update a temporary macro (i.e., SUB_FAILED) if the step failed. Then after calling the subroutine, use that temporary macro value to determine if the subroutine failed.

The attached sample demonstrates both methods.

Note: This sample project requires VBP v6.
Attached Files
File Type: bld subfailure.bld (3.9 KB, 1052 views)
Reply With Quote