Kinook Software Forum

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

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 03-06-2003, 07:50 PM
tony_counts tony_counts is offline
Registered User
 
Join Date: 01-20-2003
Posts: 1
Failure Steps

I currently use the failure step to send a failure message via email
to the responsible user if a build fails.

Is there a way under visual build pro (4.6b) to continue the build
process after it notifies the user ?

It would be nice if there were a failure in step 10, that it would
notify someone, but continue through the other 60 steps. That way I could leave it to run unattended overnight, and always have the latest graetest code (that would compile) waiting on us in the
morning.

Ignoring the fail condition, does not fire the Failure Step, and no
notification is produced.
Reply With Quote
  #2  
Old 03-06-2003, 07:52 PM
Too_Tall_Crown_Victoria Too_Tall_Crown_Victoria is online now
Registered User
 
Join Date: 01-15-2003
Posts: 44
Create a group after the step that might fail and check the
%LASTSTEP_STATUS% system macro. Depending on what the step is the return code will be different. Also you will have to check the ignore failure box on the step that might fail. Then under this new group you can add your e-mail step and still continue on.

Let me know if this works for you.

Tom Kielty
Senior Software Engineer
Research And Development
tom.kielty@spanlink.com
(763) 971-2134
Fax: (763) 971-2334

Spanlink Communications
7125 Northland Terrace, Suite 100
Brooklyn Park, Minnesota 55428
(763) 971-2000
Reply With Quote
  #3  
Old 03-06-2003, 07:54 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply


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 01:51 AM.


Copyright © 1999-2023 Kinook Software, Inc.