diff --git a/services/distributedfiledaemon/src/device/device_manager_agent.cpp b/services/distributedfiledaemon/src/device/device_manager_agent.cpp index d5129fae105ac4d6ad2302e1b52ad261e0586dba..af568a2fdc44fae49e2585c323d89c756a808256 100644 --- a/services/distributedfiledaemon/src/device/device_manager_agent.cpp +++ b/services/distributedfiledaemon/src/device/device_manager_agent.cpp @@ -57,8 +57,14 @@ void DeviceManagerAgent::StopInstance() void DeviceManagerAgent::Start() { - RegisterToExternalDm(); - InitLocalNodeInfo(); + try { + RegisterToExternalDm(); + InitLocalNodeInfo(); + } catch (const Exception &e) { + LOGE("interacting with devicemanager failed, err code %{public}d", e.code()); + } catch (const std::exception &e) { + LOGE("Unexpect Low Level exception"); + } } void DeviceManagerAgent::Stop() diff --git a/services/distributedfileservice/BUILD.gn b/services/distributedfileservice/BUILD.gn index d59374d7139833a32e5860f7eaf5d6806990ff6e..14752194e1b10e82a0bc64dd53ad96efb116a7a9 100644 --- a/services/distributedfileservice/BUILD.gn +++ b/services/distributedfileservice/BUILD.gn @@ -24,7 +24,6 @@ ohos_shared_library("libdistributedfileservice") { configs = [ "${utils_path}:compiler_configs" ] external_deps = [ - "aafwk_standard:want", "ability_runtime:app_manager", "ability_runtime:want", "appexecfwk_standard:appexecfwk_base",