Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Thread Tools Rate Thread Display Modes
Old 04-27-2006, 01:25 PM
modernrocketry modernrocketry is online now
Registered User
Join Date: 04-06-2006
Posts: 19
Fail Build from VBScript

I am using the tlbimp command in a build and have noticed that when an error occurs, the build continues.

So I cobbled together a vb script to parse the LASTSTEP_OUTPUT and look for an error (TlbImp : error)
Everything works as planned, except stopping the build if an error is found.

I thought "Step.BuildStatus = vbldStepStatFailed" would stop the set, but it reports succeeded and keeps going.
What am I doing wrong?

output = Split(Application.Macros(vbldMacroSystem)("LASTSTEP_OUTPUT"), vbCrLf)
For i = 0 To UBound(output)
    strSearchThis = output(i)
    if instr(strSearchThis, "TlbImp : error") > 0 then
         Builder.LogMessage "TLB ERROR FOUND"
         Step.BuildStatus = vbldStepStatFailed
         Exit for
    end if
Reply With Quote
Old 04-27-2006, 03:58 PM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,849
Where is the code, in the step's vbld_StepDone event? That should work (as long as 'Continue building' is not checked on the General tab). Please ZIP and send or post:
1) The info from Help | About | Install Info
2) A .bld file that reproduces the problem
3) A build log file
Reply With Quote
Old 04-27-2006, 04:59 PM
modernrocketry modernrocketry is online now
Registered User
Join Date: 04-06-2006
Posts: 19
My error.
I had the above code inserted as a child step.
Once I moved it to the parent step in the correct event -- worked like a charm

Thanks for the quick turn around
Reply With Quote
Old 06-18-2010, 04:52 AM
wellilein wellilein is online now
Registered User
Join Date: 11-30-2005
Posts: 53
Similar for actions

I had a similar issue for a custom action.

Once I moved the code inside
Function vbld_BuildStep()
I was able to let the action fail by setting
vbld_BuildStep = vbldStepStatFailed
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 12:17 AM.

Copyright 1999-2022 Kinook Software, Inc.