projects
/
sdk
/
tools
/
coreprofiler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
841dd77
)
Profiler::HandleException() prints to LOG().Warn() for not FAILED HRESULTs
author
Aleksei Vereshchagin
<avereschagin@dev.rtsoft.ru>
Mon, 11 Dec 2017 17:16:24 +0000
(20:16 +0300)
committer
Aleksei Vereshchagin
<avereschagin@dev.rtsoft.ru>
Mon, 11 Dec 2017 17:16:24 +0000
(20:16 +0300)
src/profiler.cpp
patch
|
blob
|
history
diff --git
a/src/profiler.cpp
b/src/profiler.cpp
index efbe8b902282a14cfdff5a81bee9a471ea227d68..262e1c2091ad54d894f8bb312776e02a2af791d5 100644
(file)
--- 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)
{