Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: vino.sd08 on October 14, 2016, 12:28:46 PM
-
Hi all, i think it might be a PSDK error for .Net.
We are getting below error while printing the EventRinging Event by .Tostring().
We tried this with java based application and dotnet based application at the same time with same agent login id and place. In java it working fine.
actually it printing all attributes but when tries to get data from Userdata it shows the error
[quote]can't process DataSupport class cause exception: [ArgumentException] An entry with the same key already exists.
at: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.TreeSet`1.AddIfNotPresent(T item)
at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value)
at Genesyslab.Platform.Commons.Collections.Internal.OrderedHashmapImpl.GetAllKeys()
at Genesyslab.Platform.Commons.Collections.Internal.OrderedHashmapImpl.OrderedHashmapImplEnumerator..ctor(OrderedHashmapImpl hm)
at Genesyslab.Platform.Commons.Collections.Internal.OrderedHashmapImpl.GetEnumerator()
at Genesyslab.Platform.Commons.Collections.Filters.KeyValueFilterSet.FilterList[T](StringBuilder buf, KeyValueCollectionBase`1 col, Int32 indent)
at Genesyslab.Platform.Commons.Protocols.Internal.KeyValueCodec.Genesyslab.Platform.Commons.Protocols.Internal.IPrintable.AppendLogValue(StringBuilder buf, Object customTypeObject, Int32 ident, Boolean truncate, Boolean hide)
at Genesyslab.Platform.Commons.Protocols.Internal.ToStringHelper.AppendLogValue(StringBuilder buffer, IDataSupport data, Int32 indent, Boolean hide, Boolean truncate)[/quote]
??? ??? ??? ???
Any body out there can help us in this.
-
I am also having same issue
-
Can you past the code wich is launching this execption?
-
[code] public void ReceiveCalls(IMessage events)
{
if (events != null)
{
try
{
this.logger.Info("ReceiveCalls: Voice Event Received : " + events.ToString());
}
catch (Exception generalException)
{
this.logger.Error(generalException.ToString());
}
}
}[/code]
-
Try
generalException.Message.ToString()
instead
generalException.ToString()
-
Sure but problem is not in catch block
-
General advice : Do not use ToString() method in .Net
-
[quote author=bhuvanesh link=topic=9898.msg45487#msg45487 date=1482140888]
Sure but problem is not in catch block
[/quote]
I had this problem too, and it was because i tried to parse tostring directly generalException. Instead of that you have to parse the Message or InnerException and you will see the error that is launching your catch block. Now you are having exception inside the cath.