From 132e784cee34ce2cf5fc2f98e1101903d913e104 Mon Sep 17 00:00:00 2001 From: "sangwan.kwon" Date: Fri, 27 Oct 2017 13:48:55 +0900 Subject: [PATCH] Fix log level of NOT_INSTALLED as INFO Change-Id: I0e152da4340c8cf6c84632cb1822ba2b6f25b03a Signed-off-by: sangwan.kwon --- src/exception.cpp | 8 ++++++-- src/trust-anchor.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/exception.cpp b/src/exception.cpp index 5fee6af..abe93d2 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -48,7 +48,12 @@ int exceptionGuard(const std::function &func) errStr = "Internal error."; break; } - ERROR(SINK, errStr + e.what()); + + if (e.error() == TRUST_ANCHOR_ERROR_NOT_INSTALLED) + INFO(SINK, e.what()); + else + ERROR(SINK, errStr + e.what()); + return e.error(); } catch (const runtime::Exception &e) { ERROR(SINK, e.what()); @@ -74,7 +79,6 @@ Exception::Exception(int ec, const char *file, const char *function, m_message(FORMAT("[" << file << ":" << line << " " << function << "()]" << message)) { - ERROR(SINK, this->m_message); } const char *Exception::what() const noexcept diff --git a/src/trust-anchor.cpp b/src/trust-anchor.cpp index aca3b94..32568ef 100644 --- a/src/trust-anchor.cpp +++ b/src/trust-anchor.cpp @@ -107,7 +107,7 @@ int TrustAnchor::Impl::uninstall(void) const noexcept void TrustAnchor::Impl::preLaunch(void) { if (!this->m_logic.isCustomBaseValid()) - ThrowExc(TRUST_ANCHOR_ERROR_NOT_INSTALLED, "Base directory does not exist."); + ThrowExc(TRUST_ANCHOR_ERROR_NOT_INSTALLED, "Tanchor is not installed before."); if (!this->m_logic.isSystemCertsUsed()) return; -- 2.34.1