Fix log level of NOT_INSTALLED as INFO 65/157965/2
authorsangwan.kwon <sangwan.kwon@samsung.com>
Fri, 27 Oct 2017 04:48:55 +0000 (13:48 +0900)
committersangwan.kwon <sangwan.kwon@samsung.com>
Fri, 27 Oct 2017 05:39:59 +0000 (14:39 +0900)
Change-Id: I0e152da4340c8cf6c84632cb1822ba2b6f25b03a
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
src/exception.cpp
src/trust-anchor.cpp

index 5fee6af..abe93d2 100644 (file)
@@ -48,7 +48,12 @@ int exceptionGuard(const std::function<int()> &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
index aca3b94..32568ef 100644 (file)
@@ -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;