#1
|
|||
|
|||
vbld_StepDone fails,build does not continue
I have a step where "Continue building" checkbox is ticked.
So if the step fails -the build continues.For this step in ScriptEditor I have implemented some code for vbld_StepDone event. Problem is -if this code fails-the build process is stopped despite of the "Continue building" set to TRUE. As I see in the comments of vbld_StepDone -this is normal: ' If the step is marked to ignore failure, throwing or raising an error ' or calling Builder.Stop from this event will not ignore the failure ' (providing a way to abort the build even when the step is marked to ' ignore failure). Question -is there any way to avoid this? I mean even if the code in vbld_StepDone fails for some reason-the build process to contine. |
#2
|
|||
|
|||
Eat the errors (On Error Resume Next in VBScript, try { ... } catch(err) { } in JScript).
|
#3
|
|||
|
|||
I added
On Error Resume Next immediately after Sub vbld_StepDone() so the build continues but i do not see any error message. I would need a way to see the error message and to trigger the failure step but to have the build continued with next step. |
#4
|
|||
|
|||
See attached sample (assumes VBScript is default scripting language).
|
#5
|
|||
|
|||
Tks!
so the code : ' check failure and mark step as failed if so If Err.Number <> 0 Then Builder.LogMessage Err.Description Step.BuildStatus = vbldStepStatFailed End If could stay only once at the end of the subprocedure,it is not necessary to write it after any operation that could fail. |
#6
|
|||
|
|||
Yes, as long as Err is not cleared.
|
|
|