Unhandled Exception: ThomsonReuters.RFA.Common.InvalidUsageException

tai.zhang
tai.zhang Newcomer

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)

Tagged:

Best Answer

  • warat.boonyanit
    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
    }

Answers