From 0b9fd0664e5e805552c9e0bdac4fe5ecd4e0e966 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 21 Oct 2024 16:33:13 +0200 Subject: [PATCH] setting detsize after hostname should throw also for single module for consistency (#1000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Erik Fröjdh --- slsDetectorSoftware/src/DetectorImpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index e16e57f53..02ddcf7f5 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -330,7 +330,8 @@ slsDetectorDefs::xy DetectorImpl::getNumberOfChannels() const { } void DetectorImpl::setNumberOfChannels(const slsDetectorDefs::xy c) { - if (size() > 1) { + // detsize is set before hostname + if (size() >= 1) { throw RuntimeError( "Set the number of channels before setting hostname."); }