Error Return Values
- Last UpdatedAug 18, 2016
- 1 minute read
The following error values may be returned from the recipe automation server:
0 = Fail
1 = Success
You can use the error values in conjunction with the ErrorMessage property to display error messages. For example, you can use the following code in Visual Basic for error handling.
Private Sub Form_Load()
' Define required variables
Dim RecipeVar As New wwRecipe
Dim ReturnCode As Boolean
' Run the desired method
ReturnCode = RecipeVar.AddProcessClass("Invalid_Class")
' If the method fails, display a message box with the error
' message. The method can also be used as the If clause
If Not (ReturnCode) Then
MsgBox RecipeVar.ErrorMessage
End If
End Sub