Being C++ class library, the Handler uses exceptions to report about error occurred while performing certain action. For example, the Handler will raise regular exception to report about inability to find actual license for the product. However, Handler processes market data asynchronously, therefore Handler is not able to report about any further errors since market data processing is started. For this reason, the Handler exposes OnixS::CME::DropCopy::ErrorListener interface and OnixS::CME::DropCopy::Handler::registerErrorListener member to be able to subscribe to and handle errors.
Once instance of OnixS::CME::DropCopy::ErrorListener is assigned to the Handler, it will invoke OnixS::CME::DropCopy::ErrorListener::onError member each time error occurs. OnixS::CME::DropCopy::ErrorListener::onError member has several incoming parameters one of which defines human-readable explanation (description) of the error.
Usually, in case of error Handler will automatically restart market data processing starting from security definitions processing. Therefore, in most cases nothing special is to be done if further data processing is desired. However, under some circumstances, manual intrusion is required (for example, if the Handler is unable to connect).
Following sample demonstrates how to receive error notifications: