using only sls exceptions

This commit is contained in:
Erik Frojdh
2019-03-14 17:09:44 +01:00
parent bad44f5bf4
commit 9f724f0c0d
8 changed files with 29 additions and 16 deletions

View File

@ -14,6 +14,7 @@
#include "HDF5File.h"
#endif
#include "DataStreamer.h"
#include "sls_detector_exceptions.h"
#include <iostream>
#include <errno.h>
@ -56,7 +57,7 @@ DataProcessor::DataProcessor(int ind, detectorType dtype, Fifo* f,
currentFrameIndex(0)
{
if(ThreadObject::CreateThread() == FAIL)
throw std::exception();
throw sls::RuntimeError("Could not create processing thread");
FILE_LOG(logDEBUG) << "DataProcessor " << ind << " created";

View File

@ -8,6 +8,7 @@
#include "GeneralData.h"
#include "Fifo.h"
#include "ZmqSocket.h"
#include "sls_detector_exceptions.h"
#include <iostream>
#include <errno.h>
@ -35,7 +36,7 @@ DataStreamer::DataStreamer(int ind, Fifo* f, uint32_t* dr, std::vector<ROI>* r,
completeBuffer(nullptr)
{
if(ThreadObject::CreateThread() == FAIL)
throw std::exception();
throw sls::RuntimeError("Could not create streaming thread");
FILE_LOG(logDEBUG) << "DataStreamer " << ind << " created";

View File

@ -6,6 +6,7 @@
***********************************************/
#include "Fifo.h"
#include "sls_detector_exceptions.h"
#include <iostream>
#include <cstdlib>
@ -23,7 +24,7 @@ Fifo::Fifo(int ind, uint32_t fifoItemSize, uint32_t depth):
status_fifoFree(depth){
FILE_LOG(logDEBUG3) << __SHORT_AT__ << " called";
if(CreateFifos(fifoItemSize) == FAIL)
throw std::exception();
throw sls::RuntimeError("Could not create FIFO");
}

View File

@ -11,6 +11,7 @@
#include "Fifo.h"
#include "genericSocket.h"
#include "container_utils.h" // For sls::make_unique<>
#include "sls_detector_exceptions.h"
#include <iostream>
#include <errno.h>
@ -57,7 +58,7 @@ Listener::Listener(int ind, detectorType dtype, Fifo* f, runStatus* s,
oddStartingPacket(true)
{
if(ThreadObject::CreateThread() == FAIL)
throw std::exception();
throw sls::RuntimeError("Could not create listener thread");
FILE_LOG(logDEBUG) << "Listener " << ind << " created";
}

View File

@ -15,6 +15,7 @@
#include "slsReceiver.h"
#include "slsReceiverTCPIPInterface.h"
#include "sls_detector_exceptions.h"
#include "gitInfoReceiver.h"
#include "logger.h"
@ -60,7 +61,7 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
tempval = GITREV;
tempval = (tempval <<32) | GITDATE;
std::cout << "SLS Receiver " << GITBRANCH << " (0x" << std::hex << tempval << ")" << std::endl;
throw std::exception();
throw sls::RuntimeError();
case 'h':
default:
@ -73,7 +74,7 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
+ "\t receivers\n\n";
FILE_LOG(logINFO) << help_message << std::endl;
throw std::exception();
throw sls::RuntimeError();
}
}