Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3274084
D13525.id44706.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13525.id44706.diff
View Options
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -651,7 +651,7 @@
error = e.what();
}
- this->cryptoThread->scheduleTask([=]() {
+ taskType cryptoJob = [=]() {
std::string error;
this->contentCryptoModule.reset(new crypto::CryptoModule(
this->publicCryptoAccountID,
@@ -688,7 +688,13 @@
this->jsInvoker_->invokeAsync(
[=]() { promise->resolve(jsi::Value::undefined()); });
- });
+ };
+ try {
+ this->cryptoThread->scheduleTask(cryptoJob);
+ } catch (const std::exception &e) {
+ error = e.what();
+ this->jsInvoker_->invokeAsync([=]() { promise->reject(error); });
+ }
};
GlobalDBSingleton::instance.scheduleOrRunCancellable(
job, promise, this->jsInvoker_);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 6:26 AM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2513880
Default Alt Text
D13525.id44706.diff (1 KB)
Attached To
Mode
D13525: [native] Catch when initializeCryptoAccount fails to schedule on crypto thread
Attached
Detach File
Event Timeline
Log In to Comment