return 0;
}
- engine->mount(mountKey, getOptions());
- mountKey.clear();
+ INFO(SINK, "Mount external storage...");
+ try {
+ engine->mount(mountKey, getOptions());
+ mountKey.clear();
+ } catch (runtime::Exception &e) {
+ mountKey.clear();
+ ERROR(SINK, "Failed to mount: " + std::string(e.what()));
+ return -3;
+ }
context.notify("ExternalEncryptionServer::mount");
INFO(SINK, "Close all applications using external storage...");
killDependentApplications(EXTERNAL_PATH);
INFO(SINK, "Umount external storage...");
- engine->umount();
+ try {
+ engine->umount();
+ } catch (runtime::Exception &e) {
+ ERROR(SINK, "Failed to umount: " + std::string(e.what()));
+ return -3;
+ }
return 0;
}