Unhandled Exception: ThomsonReuters.RFA.Common.InvalidUsageException
our RFA quote souring application failed recently with the below error message.
Unhandled Exception: ThomsonReuters.RFA.Common.InvalidUsageException: Exception of type 'ThomsonReuters.RFA.Common.InvalidUsageException' was thrown.
at ThomsonReuters.RFA.SessionLayer.OMMConsumer.RegisterClient(EventQueue queue, OMMIntSpec cInterestSpec, Client client, Object closure) in c:\jenkins\workspace\dlibnetcore\os\vs140-64\rfawr\sessionlayer\ommconsumer.cpp:line 205
at BBSW.Tasks.RFA.MarketPrice.RDMDict.SendDictionaryRequest(String serviceName, Context ctx) in C:\bamboo-agent-home\xml-data\build-dir\BBSW-BBSWTAS33-JOB1\BBSW.Tasks.RFA.MarketPrice\RDMDict.cs:line 86
at BBSW.Tasks.RFA.MarketPrice.DictionaryManager.GetDict(String serviceName) in C:\bamboo-agent-home\xml-data\build-dir\BBSW-BBSWTAS33-JOB1\BBSW.Tasks.RFA.MarketPrice\DictionaryManager.cs:line 38
my questions:
1, in which cases, InvalidUsageException is thrown?
2, is there any way to log more details?
(we're using ROBUST FOUNDATION API 8.1)
Best Answer
-
Hi @tai.zhang
InvalidUsageException is thrown when; as the name imply; you invalidly use the function call.
This could be anything from null Client, invalid InterestSpec, or OMMConsumer has been destroyed.
You should try adding try/catch block to catch the invalid usage exception and print out the exception status text.
try
{
handle = ommConsumer.RegisterClient(eventQueue,ommItemIntSpec,client,closure);
}
catch (InvalidUsageException exception)
{
RFA_String excpStatusText = exception.Status.StatusText;
//Print excpStatusText
}0
Answers
-
thanks Warat.
we will do try..catch for sure. but this RegisterClient only crashes occasionally.
since RegisterClient is a built-in RFA function. i guess my question is for this method, at what scenarios, InvalidUsageException will be thrown.i don't think OMMConsumer has been destroyed, as the log says "
at ThomsonReuters.RFA.SessionLayer.OMMConsumer.RegisterClient(EventQueue
queue, OMMIntSpec cInterestSpec, Client client, Object closure) in
c:\jenkins\workspace\dlibnetcore\os\vs140-64\rfawr\sessionlayer\ommconsumer.cpp:line
205"
0 -
RFA .NET is a wrapper of RFA C++.
The exception was thrown from unmanaged RFA C++ code, which is not shown in the stack trace. And so I am afraid we cannot give the exact root cause from the stack. You need the exception status text.
However, the most common exception from RegisterClient is "OMMConsumer::registerClient() has been called with an item request prior to login request. Login request is expected first."
This could happen when the login request got rejected, but the application did not check that the login has been reject and sent the item request anyway.
0 -
thanks Warat. is any where i can find the souce code for
RegisterClient?
0 -
RFA is not Open-Source, I'm afraid. It's impossible to get the source code.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 89 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛