From 5e5c19db8f9b2576da9b4fd855d2483eddb9812e Mon Sep 17 00:00:00 2001
From: Martin Hierholzer <martin.hierholzer@desy.de>
Date: Fri, 18 Nov 2016 15:00:37 +0100
Subject: [PATCH] made an exception description a bit more elaborate

---
 include/FanOut.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/FanOut.h b/include/FanOut.h
index 309ee077..e1dd6701 100644
--- a/include/FanOut.h
+++ b/include/FanOut.h
@@ -75,8 +75,11 @@ namespace ChimeraTK {
           if( castedSlave->getNumberOfSamples() != 0 && 
               ( castedSlave->getNumberOfChannels() != impl->getNumberOfChannels() ||
                 castedSlave->getNumberOfSamples() != impl->getNumberOfSamples()      ) ) {
-            throw ApplicationExceptionWithID<ApplicationExceptionID::illegalParameter>(
-                "FanOut::addSlave(): Trying to add a slave with incompatible array shape!");
+            std::string what = "FanOut::addSlave(): Trying to add a slave '";
+            what += castedSlave->getName();
+            what += "' with incompatible array shape! Name of master: ";
+            what += impl->getName();
+            throw ApplicationExceptionWithID<ApplicationExceptionID::illegalParameter>(what.c_str());
           }
           slaves.push_back(castedSlave);
         }
-- 
GitLab