CommCoreModule::getAllMessagesSync and CommCoreModule::getALlThreadsSync execute database query on teh WorkerThread without error handling. If database operation fails we are left with uninformative application crash. Catching error thrown by sqlite orm and re-throwing it as JSError enables us to continue using application and see detailed information regarding the error.
Details
Diff Detail
- Repository
- rCOMM Comm
- Branch
- marcin/eng-1449
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
166–175 | Is this error propagated to the js? The method returns jsiMessages which is a new array and doesn't contain any info about the exception jsi::Array(rt, numMessages). Or maybe I'm missing something and it works as expected? Maybe calling set_exception stops the execution? - that happens in another thread, so I guess there might be something more to this. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
166–175 | Error is propagated to JavaScript, I tested it as described in the test plan. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
166–175 | Thanks! That explains everything I wanted to know! |