00001 #include "SequenceRequestWorker.h"
00002 #include "Sct/Exception.h"
00003 #include "Sct/StdExceptionWrapper.h"
00004 
00005 namespace SctCalibrationController {
00006 
00007     void SequenceRequestWorker::operator () (){  
00008     Sct::Throwable* mrs = 0;
00009     try {
00010         cout << "In SequenceRequestWorker operator ()" << endl;
00011         m_cc.executeSequence(*m_sr);
00012         m_cc.status.status = m_cc.status.INCONTROL;  
00013         m_cc.updateStatus();
00014         cout << "End of SequenceRequestWorker operator()" << endl;
00015     } catch(Sct::Throwable &e) {
00016         e.sendToMrs(MRS_ERROR);
00017     } catch(std::exception &e) {
00018         mrs = new Sct::StdExceptionWrapper(e);
00019     } catch(std::string &s) {          
00020         std::ostringstream os;
00021         os<<"uncaught string expection "<<s;
00022         mrs = new Sct::Error(os.str(), __FILE__, __LINE__);
00023     } catch(...) {
00024         mrs = new Sct::Error("uncaught unknown exception", __FILE__, __LINE__);
00025     }
00026     if (mrs) {
00027         mrs->sendToMrs(MRS_ERROR);
00028     }
00029     }
00030 }