comparison OrthancStone/Sources/Messages/IObservable.cpp @ 1858:be88206f8d78

display what() of C++ exceptions on error while processing a message
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Sep 2021 22:17:32 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
comparison
equal deleted inserted replaced
1857:fae708b2d212 1858:be88206f8d78
25 #include "../StoneException.h" 25 #include "../StoneException.h"
26 26
27 #include <Logging.h> 27 #include <Logging.h>
28 28
29 #include <cassert> 29 #include <cassert>
30 #include <stdexcept>
30 31
31 namespace OrthancStone 32 namespace OrthancStone
32 { 33 {
33 IObservable::~IObservable() 34 IObservable::~IObservable()
34 { 35 {
86 } 87 }
87 catch (StoneException& e) 88 catch (StoneException& e)
88 { 89 {
89 LOG(ERROR) << "Exception on callable: " << e.What(); 90 LOG(ERROR) << "Exception on callable: " << e.What();
90 } 91 }
92 catch (std::exception& e)
93 {
94 LOG(ERROR) << "C++ exception on callable: " << e.what();
95 }
91 catch (...) 96 catch (...)
92 { 97 {
93 LOG(ERROR) << "Native exception on callable"; 98 LOG(ERROR) << "Native exception on callable";
94 } 99 }
95 } 100 }