Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-06-2003, 06:54 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
There are a couple ways to stop the build from within a build:
1) a Run Program step with a bogus command-line;
2) a Run Script step with the code:
Err.Raise 1, Step.Name, "Step failure message" ' VBScript, or
throw 1; // JScript

The drawback to this approach in your case is that the step that actually failed would be marked successful and the user would need to manually uncheck/recheck and start the build from that step after fixing the problem.

Since you want to conditionally cause a build to stop on failure based on the whether the build is GUI/console, another option would be to modify the 'Ignore failure' flag of the ISStep before it gets built. Set the step to not ignore failure (so that it will stop if it fails when built in the GUI), and add a Run Script step right before it with this code (VBScript):

If Application.Context = vbldContextCommandLine Then
Project.Steps(Step.Type)(Builder.BuildIndex+1).Ign oreFailure = True
End If
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:28 PM.


Copyright © 1999-2023 Kinook Software, Inc.