Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Frequently Asked Questions > Scripting
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-27-2003, 07:41 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
How can I force the build to abort from script?

Option #1: Add an Exit step configured with an exit status of Failure (to build failure steps) or Cancel (to stop without building failure steps). The step can use a conditional build rule to conditionally abort the build.


Option #2: Use VBScript code of:

Step.BuildStatus = vbldStepStatFailed

in a step script event (accessed by clicking the Script Editor button on the step properties dialog, clicking the Events button, and choosing a step event).


Option #3: Use VBScript code of:
Code:
Err.Raise 1, "", "Error message"
or the following Jscript code (note: the error message thrown doesn't get logged for JScript):
Code:
throw "Error";
The code can be placed in a script function, the code of a Run Script step, or in a step event function.
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 On



All times are GMT -5. The time now is 03:23 AM.


Copyright © 1999-2023 Kinook Software, Inc.