diff options
author | Seungha Son <seungha.son@samsung.com> | 2017-08-10 18:53:36 +0900 |
---|---|---|
committer | Seungha Son <seungha.son@samsung.com> | 2017-08-11 12:08:25 +0900 |
commit | 2103f7034c2075e58fa7dce87f1e2b9f980522a9 (patch) | |
tree | 91601986388601b820b3e8dcfc0753ba9b7ec12e | |
parent | 2c0b1906f20386080e2c2aea05ce7cc99c15affa (diff) | |
download | app-installers-2103f7034c2075e58fa7dce87f1e2b9f980522a9.tar.gz app-installers-2103f7034c2075e58fa7dce87f1e2b9f980522a9.tar.bz2 app-installers-2103f7034c2075e58fa7dce87f1e2b9f980522a9.zip |
Add exception handler
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I4efd0db6fe47e21da0cd84380a974bb247f5a3be
-rw-r--r-- | src/pkg_recovery/pkg_recovery_helper.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pkg_recovery/pkg_recovery_helper.cc b/src/pkg_recovery/pkg_recovery_helper.cc index ea333a88..3d4edf35 100644 --- a/src/pkg_recovery/pkg_recovery_helper.cc +++ b/src/pkg_recovery/pkg_recovery_helper.cc @@ -115,7 +115,13 @@ std::vector<RecoverEntry> SearchRecoveryFiles(uid_t uid) { int main() { uid_t uid = getuid(); std::vector<std::pair<std::string, std::string>> list; - list = SearchRecoveryFiles(uid); + try { + list = SearchRecoveryFiles(uid); + } catch (...) { + LOG(WARNING) << "Exception occurred: " + << boost::current_exception_diagnostic_information(); + return 0; + } for (auto entry : list) { if (!RequestRecoveryService(uid, entry.first.c_str(), entry.second.c_str())) |