API Support Forum
OEC API > API Support > OnError Index was out of range.
Author Topic: OnError Index was out of range.
(2 messages, Page 1 of 1)
Moderators: VPfau
jlanawalt
Posts: 88
Joined: Feb 12, 2009


Posted: Dec 19, 2012 @ 01:26 PM             Msg. 1 of 2
Yesterday we had a customer frequently getting this message on their demo account, but I didn't notice the report until today when it seems to not be happening, at least not to me when I log into their account.

Index was out of Range. Must be non-negative and less than the size of the collection. Parameter name: Index

Is there a way we can track down what may have been causing this error with our use of OEC API COM? We have this issue occasionally and have not found the right place to log the source of this error. Usually it is a time-sensitive issue related to some order and goes away by the end of the trading session or when the order fills.

--
Jacob Anawalt
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Dec 19, 2012 @ 03:07 PM             Msg. 2 of 2
OnError event is supposed for handling such uncaught exceptions. But, because of your code is behind COM, its Stack Trace will point just to an entry point in .NET/COM subsystem.

Victor Vins
Lead Software Developer