mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Example tests: check exit codes
This commit is contained in:
committed by
Dennis Klein
parent
afd5700cca
commit
61d2797971
@@ -9,6 +9,8 @@
|
||||
#include <fairmq/Device.h>
|
||||
#include <fairmq/runDevice.h>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace bpo = boost::program_options;
|
||||
|
||||
struct Sink : fair::mq::Device
|
||||
@@ -32,7 +34,7 @@ struct Sink : fair::mq::Device
|
||||
// Creates a message using the transport of channel ack
|
||||
fair::mq::MessagePtr ack(NewMessageFor("ack", 0));
|
||||
if (Send(ack, "ack") < 0) {
|
||||
return false;
|
||||
throw std::runtime_error("could not send an ack");
|
||||
}
|
||||
|
||||
// return true if want to be called again (otherwise go to IDLE state)
|
||||
|
Reference in New Issue
Block a user