Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: cavagnaro on August 13, 2013, 07:44:51 PM

Title: Suscribe to Error method
Post by: cavagnaro on August 13, 2013, 07:44:51 PM
Hi,
Using .Net 8.1 PSDK
I want to be able to receive errors from the Protocol to I can handle them in a more custom way.
Right now i do:

[Code]
try{
protocol.Open();
}catch(Exception ex){
Console.Write(ex.Message);
}
[/code]

But for a end user is not exactly a friendly message. Therefore would like to manage it.

If I do:

[Code]
protocol.Error += protocol_Error;
[/code]

Then on the function protocol_Error I receive nothing or is never invoked

Doing protocol.Received it does work...what is the difference or how to use the Error?

Thanks
Title: Re: Suscribe to Error method
Post by: Kubig on August 14, 2013, 07:20:17 AM
I think that Error handler on connectionprotocl fired only error related to self connection, but not the error that are receiving.
Title: Re: Suscribe to Error method
Post by: cavagnaro on August 14, 2013, 08:52:04 AM
??? Don't understand what you mean Kubig
Title: Re: Suscribe to Error method
Post by: Kubig on August 14, 2013, 09:03:39 AM
You tried to catch errors on hanlder which is not for these purposes, protocol.Error handler provides only error about connection to the server, not errors from the server
Title: Re: Suscribe to Error method
Post by: cavagnaro on August 14, 2013, 09:11:37 AM
Ermmm...
Yes, for example. I have no network connection to the server. So I do the OPEN and returns "Can't open channel" from the try:catch but doesn't it also be notified to the Error handler?
Title: Re: Suscribe to Error method
Post by: Kubig on August 14, 2013, 10:30:02 AM
It was just my opinion, I will try it and let you know
Title: Re: Suscribe to Error method
Post by: cavagnaro on August 14, 2013, 02:38:58 PM
;) Thanks!