Summary
In this chapter, we discussed error handling in RxCpp
, along with some of the advanced constructs and Operators to handle Streams in the RxCpp
library. We visited the basic principles of a reactive system, and gave more emphasis to one of the key pillars of a reactive system, resilience, when we discussed error handling mechanisms. We discussed features such as error handlers (on_error
), which need to be used with subscription. Also, we discussed RxCpp
Operators, such as on_error_resume_next()
, retry()
, and finally()
, to discuss how to continue Streams when an error comes, how to wait for the producer of the Stream to correct the error and continue the sequence, and how to perform common operations that are applicable to both success and error paths. Finally, we discussed two sample programs, to understand more about Stream processing. These programs illustrated how the RxCpp
library can be used to process a Stream of UX events (simulated using a console program) and aggregate data...