Some of our functions return a result, e.g. CalibrationResult.SUCCESS or CalibrationResult.BUSY.
In case of success, we just pass the element (calling the RxJava onNext). But in case of failure (everything that is not SUCCESS, IN_PROGRESS or INSTRUCTION), we throw an exception (in the RxJava sense, with onError).
Just as a reminder: we currently have IN_PROGRESS and INSTRUCTION, but in the future (i.e. when the C++ API gets generated), they will be merged into NEXT. Which means that the only success codes will ever be SUCCESS and NEXT.
@julianoes: FYI
Some of our functions return a result, e.g.
CalibrationResult.SUCCESS
orCalibrationResult.BUSY
.In case of success, we just pass the element (calling the RxJava
onNext
). But in case of failure (everything that is notSUCCESS
,IN_PROGRESS
orINSTRUCTION
), we throw an exception (in the RxJava sense, withonError
).Just as a reminder: we currently have
IN_PROGRESS
andINSTRUCTION
, but in the future (i.e. when the C++ API gets generated), they will be merged intoNEXT
. Which means that the only success codes will ever beSUCCESS
andNEXT
.