From: Krzysztof Jackiewicz Date: Mon, 31 Mar 2025 15:00:20 +0000 (+0200) Subject: Log errors during data removal X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F323711%2F6;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git Log errors during data removal Change-Id: I6ed087ac1794ab3249c0915047187a0f832e85a9 --- diff --git a/src/ckm/ckm-common.cpp b/src/ckm/ckm-common.cpp index bd2adba4..379a9f69 100644 --- a/src/ckm/ckm-common.cpp +++ b/src/ckm/ckm-common.cpp @@ -214,11 +214,13 @@ ScopedRemoveData::~ScopedRemoveData() if (!SamePid()) return; - /* - * Let it throw. If we can't remove data then remaining tests results will be - * unreliable anyway. - */ - check_remove_allowed(m_alias); + try { + check_remove_allowed(m_alias); + } catch (const DPL::Test::TestException& e) { + RUNNER_ERROR_MSG("TestException in ScopedAppContext destructor: " << e.GetMessage()); + } catch (...) { + RUNNER_ERROR_MSG("Unknown exception in ScopedAppContext destructor"); + } } ScopedSaveData::ScopedSaveData(const std::string& alias,