OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.5.1
API documentation
Error handling and recovery

Error handling concept

Being the C++ class library, the Handler uses exceptions to report about an error occurred while performing a certain action. For example, the Handler will raise a regular exception to report about the inability to connect to the Multicast Price Feed server or about failure in login procedure. However, once subscribing to market data is succeeded, the Handler is not able to report about any further errors since it performs all handling asynchronously on a background. For this reason, the Handler exposes OnixS::ICE::iMpact::MarketData::ErrorListener interface and OnixS::ICE::iMpact::MarketData::Handler::registerErrorListener member to be able to subscribe to and handle errors.

Once instance of OnixS::ICE::iMpact::MarketData::ErrorListener is assigned to the Handler, it will invoke OnixS::ICE::iMpact::MarketData::ErrorListener::onError member each time error occurs. OnixS::ICE::iMpact::MarketData::ErrorListener::onError member has couple of input parameters which define code (identifier) of error and human-readable explanation or description of the error. OnixS::ICE::iMpact::MarketData::KnownErrors type contains constants and descriptions for the errors which may occur while processing market data from Multicast Price Feed.

An important aspect of the Handler's behavior is that in usual case there's nothing special to be done to handle errors. In particular, once a subscription for market data successfully started, Handler will process incoming market data and handle all failures by itself without any necessity in additional actions. That means, there's no need to restart subscription for market data manually, Handler will do everything by himself. Also, the Handler performs recovering from errors in the optimal way. For example, in the case of network-related issues, the Handler will rebuild only those books and market states which are based on market data from problematic Multicast Price Feed channel. It will not invalidate and rebuild the entire subscription.

See Event Listeners topic for more information concerning how to subscribe to a particular event.