To make reliable programs, you should use VB's On Error Goto structures whenever VBVoice properties and methods are used.
For example, the following code shows the proper approach to handling a Changed event in an AgentX control:
Private Sub AgentX1_Changed(ByVal Conversation As Object)
Dim Inbound as Conversation
Dim CallerID as String
Dim
CallerName as String
' Trap any errors
generated
On Error Goto Handler
' Get the data we need.
Set Inbound = Conversation
CallerID = Inbound.GetData("Caller ID")
CallerName =
Inbound.GetData("Caller Name")
' Do whatever handling we need.
' ...
Debug.Print "Error " + Err.Number + ": " +
Err.Description
' Handle the error.
' ...
' Carry on with the program.
Resume Next
' Alternatively, if the error cannot be
handled locally,
' just fall through here to the end of the
subroutine.
End Sub
Wherever possible, the AgentX components will fill Err.Number and Err.Description with a description of the error's cause. Some of the more common errors and their descriptions follow.
Error Value |
Message |
Description |
32601 |
AgentX: Could not connect to remote conversation object |
AgentX is not installed properly. Transient Network Faults Networks fail, often for no obvious reason. If a connection between two Conversation objects is lost for any reason, operations attempted on either end will fail with this error. |
32602 |
AgentX: Could not connect to remote conversation object |
ConvServ.EXE is a program that provides remote communication. The AgentX and Remote controls will normally start ConvServ. |
32603 |
AgentX: Could not transmit synch data to partner object |
No application looking for given AppID. AgentX's application IDs must match for any applications needing to communicate. This error will also occur when no application is interested in the given AppID at all (i.e. the client application is not running or the connected event sets the Connect parameter to 0). The first version of this error should not ordinarily occur at any time other than development and the only feasible handling of it is correcting the AppID to ensure that both ends of the connection are using the same one. The second version can occur under many run-time situations and should be handled gracefully. |