rxcpp

How to call on_error on a custom rxcpp operator

雨燕双飞 提交于 2019-12-24 00:46:44
问题 I've created a simple rx operator that converts a stream of strings to a stream of jsons and it works fine. However, I would like to be able to raise a custom exception and I am not sure how to call the on_error method of the subscription The operator is called convertStringToJson and a working sample can be found here: https://github.com/cipriancaba/rxcpp-examples/blob/master/src/SimpleOperators.cpp function<observable<json>(observable<string>)> SimpleOperators::convertFromStringToJson() {