From 50ba838dd9f92f14e418e8ffefbc9c7791497e2e Mon Sep 17 00:00:00 2001
From: gscalamera <graziano.scalamera@elettra.eu>
Date: Tue, 4 Apr 2017 17:15:05 +0200
Subject: [PATCH] Fixed exception

---
 src/cmd_thread.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cmd_thread.cpp b/src/cmd_thread.cpp
index 21db6bc..e73ca5b 100644
--- a/src/cmd_thread.cpp
+++ b/src/cmd_thread.cpp
@@ -94,7 +94,7 @@ void cmd_thread::run(void *)
 						cmd.cmd_id = CMD_RESPONSE;			//if no exception till now push in list request of response
 						cmd.call_id = call_id;				//if no exception till now push in list request of response
 						list.push_back(cmd);		//if no exception till now push in list request of response
-					} catch(Tango::DevFailed e) 
+					} catch(Tango::DevFailed &e)
 					{
 						TangoSys_MemStream out_stream;
 						string err(e.errors[0].desc);
@@ -123,7 +123,7 @@ void cmd_thread::run(void *)
 					try {
 						resp = dp->command_inout_reply(cmd.call_id);
 						cout << gettime().tv_sec << " cmd_thread::run() RECEIVED response to action " << cmd.arg_s3 << endl;
-					} catch(Tango::DevFailed e) 
+					} catch(Tango::DevFailed &e)
 					{
 						TangoSys_MemStream out_stream;
 						out_stream << "EXCEPTION executing action " << cmd.arg_s3 << ", err=" << e.errors[0].desc << ends;
@@ -158,7 +158,7 @@ void cmd_thread::run(void *)
 					resp = dp->command_inout_reply(cmd.cmd_id);
 					mutex_dp->unlock();
 					cout << gettime().tv_sec << " cmd_thread::run() received response to action " << cmd.arg_s << endl;
-				} catch(Tango::DevFailed e) 
+				} catch(Tango::DevFailed &e)
 				{
 					TangoSys_MemStream out_stream;
 					out_stream << "EXCEPTION executing action " << cmd.arg_s << ", err=" << e.errors[0].desc << ends;
-- 
GitLab