HAPI.ErrorCodes Class Module | Startpage |
HAPI | HAPI.ErrorCodes |
hErrors
- The hErrors enumeration type lists all the possible errors that this server can raise.
Errors can be raised which are not documented here. These will always be described in the Err.Description property.
Example: This small piece of code shows how a function could handle an error generated by the HUGINAPI ActiveX server:
Function GetANode(d As HUGINAPI.Domain, n As HUGINAPI.Node, newname as String) As Boolean
On Error Goto ErrorHandler
Set n = d.GetNewNode(hCategoryChance, hKindDiscrete)
n.Name = newname
GetANode = True
Exit Function
ErrorHandler:
MsgBox("Error: " & Err.Number - vbObjectError & " => " & Err.Description)
GetANode = False
End Function
If this function is able to create a new node and give it the specified name without generating an error, it returns True. Otherwise, it shows the error code and message and returns False.
![]() |
HUGIN Expert A/S, 2008 - comments to activex@hugin.com |