From: Aleksei Vereshchagin Date: Mon, 11 Dec 2017 17:16:24 +0000 (+0300) Subject: Profiler::HandleException() prints to LOG().Warn() for not FAILED HRESULTs X-Git-Tag: submit/tizen/20180619.075036~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa48b0596d45a54d2ba880b523df3872ecab64f7;p=sdk%2Ftools%2Fcoreprofiler.git Profiler::HandleException() prints to LOG().Warn() for not FAILED HRESULTs --- diff --git a/src/profiler.cpp b/src/profiler.cpp index efbe8b9..262e1c2 100644 --- a/src/profiler.cpp +++ b/src/profiler.cpp @@ -187,8 +187,16 @@ HRESULT Profiler::HandleException(const std::exception &e) const noexcept { if (pHresultException) { - LOG().Error() << "Exception: " << pHresultException->what() - << " (HR = " << pHresultException->hresult() << ")"; + if (FAILED(pHresultException->hresult())) + { + LOG().Error() << "Exception: " << pHresultException->what() + << " (HR = " << pHresultException->hresult() << ")"; + } + else + { + LOG().Warn() << "Exception: " << pHresultException->what() + << " (HR = " << pHresultException->hresult() << ")"; + } } else if (p_system_error) {