00001
00002 #include "ArchivingWorkerGroup.h"
00003 #include "ArchivingCommand.h"
00004 #include "Sct/StdExceptionWrapper.h"
00005
00006 namespace SctArchiving {
00007
00008 void ArchivingWorkerGroup::work(shared_ptr<ArchivingCommand> command) throw() {
00009 try {
00010 if (!command.get()) throw Sct::IllegalStateError("null command", __FILE__, __LINE__);
00011 command->execute();
00012 } catch(Sct::Throwable& e) {
00013 e.sendToMrs(MRS_ERROR);
00014 } catch(std::exception& e) {
00015 Sct::StdExceptionWrapper sew(e);
00016 sew.sendToMrs(MRS_ERROR);
00017 } catch(...) {
00018 Sct::Error e("uncaught unknown exception", __FILE__, __LINE__);
00019 e.sendToMrs(MRS_ERROR);
00020 }
00021 }
00022
00023
00024 }