mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
Exception handling from constructors for slsDetector and multiSlsDetector, zmqsockets deleted first in multi freeshm/constructor, removed unnecessary exceptions from exceptions list, replaced in slsDetector socket assign from NULL to 0
This commit is contained in:
@ -132,8 +132,7 @@ void DataStreamer::CreateZmqSockets(int* nunits, uint32_t port, const char* srci
|
||||
uint32_t portnum = port + index;
|
||||
|
||||
try {
|
||||
ZmqSocket* z = new ZmqSocket(portnum, (strlen(srcip)?srcip:NULL));
|
||||
zmqSocket = z;
|
||||
zmqSocket = new ZmqSocket(portnum, (strlen(srcip)?srcip:NULL));
|
||||
} catch (...) {
|
||||
cprintf(RED, "Error: Could not create Zmq socket on port %d for Streamer %d\n", portnum, index);
|
||||
throw;
|
||||
|
@ -194,10 +194,9 @@ int Listener::CreateUDPSockets() {
|
||||
ShutDownUDPSocket();
|
||||
|
||||
try{
|
||||
genericSocket* g = new genericSocket(*udpPortNumber, genericSocket::UDP,
|
||||
udpSocket = new genericSocket(*udpPortNumber, genericSocket::UDP,
|
||||
generalData->packetSize, (strlen(eth)?eth:NULL), generalData->headerPacketSize,
|
||||
*udpSocketBufferSize);
|
||||
udpSocket = g;
|
||||
FILE_LOG(logINFO) << index << ": UDP port opened at port " << *udpPortNumber;
|
||||
} catch (...) {
|
||||
FILE_LOG(logERROR) << "Could not create UDP socket on port " << *udpPortNumber;
|
||||
@ -254,10 +253,9 @@ int Listener::CreateDummySocketForUDPSocketBufferSize(uint32_t s) {
|
||||
|
||||
//create dummy socket
|
||||
try {
|
||||
genericSocket* g = new genericSocket(*udpPortNumber, genericSocket::UDP,
|
||||
udpSocket = new genericSocket(*udpPortNumber, genericSocket::UDP,
|
||||
generalData->packetSize, (strlen(eth)?eth:NULL), generalData->headerPacketSize,
|
||||
*udpSocketBufferSize);
|
||||
udpSocket = g;
|
||||
} catch (...) {
|
||||
FILE_LOG(logERROR) << "Could not create a test UDP socket on port " << *udpPortNumber;
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user