changeset 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 fae708b2d212
children 58681a5c727b
files OrthancStone/Sources/Messages/IObservable.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Sources/Messages/IObservable.cpp	Tue Aug 31 17:25:16 2021 +0200
+++ b/OrthancStone/Sources/Messages/IObservable.cpp	Mon Sep 06 22:17:32 2021 +0200
@@ -27,6 +27,7 @@
 #include <Logging.h>
 
 #include <cassert>
+#include <stdexcept>
 
 namespace OrthancStone 
 {
@@ -88,6 +89,10 @@
             {
               LOG(ERROR) << "Exception on callable: " << e.What();
             }
+            catch (std::exception& e)
+            {
+              LOG(ERROR) << "C++ exception on callable: " << e.what();
+            }
             catch (...)
             {
               LOG(ERROR) << "Native exception on callable";