From 146d605d19ee9e06355ef7bc31561603a8fc050f Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 17 Nov 2020 14:01:53 +0100 Subject: [PATCH] gui callback exception caught --- slsDetectorGui/src/qDrawPlot.cpp | 2 +- slsDetectorSoftware/src/DetectorImpl.cpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 2f6cbcfc2..386c09892 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -1,8 +1,8 @@ #include "qDrawPlot.h" #include "SlsQt1DPlot.h" #include "SlsQt2DPlot.h" -#include "sls/detectorData.h" #include "qCloneWidget.h" +#include "sls/detectorData.h" #include "sls/ToString.h" #include "sls/detectorData.h" diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index f9c4b33e2..5c5e029bc 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -660,11 +660,14 @@ void DetectorImpl::readFrameFromReceiver() { nDetActualPixelsX, nDetActualPixelsY, callbackImage, imagesize, dynamicRange, currentFileIndex, completeImage); - - dataReady( - thisData, currentFrameIndex, - ((dynamicRange == 32 && eiger) ? currentSubFrameIndex : -1), - pCallbackArg); + try { + dataReady( + thisData, currentFrameIndex, + ((dynamicRange == 32 && eiger) ? currentSubFrameIndex : -1), + pCallbackArg); + } catch (const std::exception &e) { + LOG(logERROR) << "Exception caught from callback: " << e.what(); + } delete thisData; } }