Commit 7afe8eab authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

AcqThread::cleanUp: include m_state when exception was raised in description

parent d8ae71b0
...@@ -222,6 +222,7 @@ void Camera::AcqThread::cleanUp() ...@@ -222,6 +222,7 @@ void Camera::AcqThread::cleanUp()
if ((m_state == Stopped) || (m_state == Idle)) if ((m_state == Stopped) || (m_state == Idle))
return; return;
State prev_state = m_state;
if ((m_state == Running) || (m_state == StopReq)) { if ((m_state == Running) || (m_state == StopReq)) {
m_state = Stopping; m_state = Stopping;
AutoMutexUnlock u(l); AutoMutexUnlock u(l);
...@@ -230,10 +231,12 @@ void Camera::AcqThread::cleanUp() ...@@ -230,10 +231,12 @@ void Camera::AcqThread::cleanUp()
{ {
AutoMutexUnlock u(l); AutoMutexUnlock u(l);
string err_msg = "AcqThread: exception thrown"; ostringstream err_msg;
err_msg << "AcqThread: exception thrown: "
<< "m_state=" << prev_state;
Event::Code err_code = Event::CamFault; Event::Code err_code = Event::CamFault;
Event *event = new Event(Hardware, Event::Error, Event::Camera, Event *event = new Event(Hardware, Event::Error, Event::Camera,
err_code, err_msg); err_code, err_msg.str());
DEB_EVENT(*event) << DEB_VAR1(*event); DEB_EVENT(*event) << DEB_VAR1(*event);
m_cam->reportEvent(event); m_cam->reportEvent(event);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment