Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-08-2003, 11:25 AM
DevBoy DevBoy is online now
Registered User
 
Join Date: 05-08-2003
Posts: 2
Trigger the build process to terminate???

Hi

One of the steps in my project involves a call to an external program ( The Ant Java make-tool ).

Ant does not return a return code on success/failure, but I am able to check the LASTSTEP_OUTPUT macro to check for a known failure string.

I'd like to trigger an error in this case and force the build process to recognise the build failure - and then proceed to execute my failure steps.

Is this possible? I realise one way of doing this is to record the failure in a macro and have EVERY step execute a conditional check to see if an error has occurred and then define some tidy-up steps which execute ONLY if a build error occurred, but there must be a better solution?

Any help would be much appreciated, thanks,

DevBoy
Reply With Quote
  #2  
Old 05-08-2003, 03:54 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-20-2003
Location: Dunedin, New Zealand
Posts: 114
In a similar situation I throw an exception that is handled by the "Failure Steps" processing. Add a script step to do the trick:

for VBScript:
Err.Raise 1, Step.Name, "Forcing build failure..."

for JScript:
throw "failure"

(with thanks for telling me how!)
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 05:36 PM.


Copyright © 1999-2023 Kinook Software, Inc.