#include <memory>
#include <string>
#include <system_error>
#include <zmq.h>
#include "common/expect.h"
#include "span.h"
Go to the source code of this file.
◆ ELECTRONEUM_LOG_ZMQ_ERROR
| #define ELECTRONEUM_LOG_ZMQ_ERROR |
( |
| ... | ) |
|
Value:do \
{ \
} while (0)
std::string message("Message requiring signing")
std::error_code get_error_code() noexcept
Print a message followed by the current ZMQ error message.
Definition at line 46 of file zmq.h.
46#define ELECTRONEUM_LOG_ZMQ_ERROR(...) \
47 do \
48 { \
49 MERROR( __VA_ARGS__ << ": " << ::net::zmq::get_error_code().message()); \
50 } while (0)
◆ ELECTRONEUM_ZMQ_CHECK
| #define ELECTRONEUM_ZMQ_CHECK |
( |
| ... | ) |
|
Value:do \
{ \
if (( __VA_ARGS__ ) < 0) \
} while (0)
If the expression is less than 0, return the current ZMQ error code.
Definition at line 38 of file zmq.h.
38#define ELECTRONEUM_ZMQ_CHECK(...) \
39 do \
40 { \
41 if (( __VA_ARGS__ ) < 0) \
42 return {::net::zmq::get_error_code()}; \
43 } while (0)
◆ ELECTRONEUM_ZMQ_THROW
| #define ELECTRONEUM_ZMQ_THROW |
( |
| msg | ) |
|
Value:
#define ELECTRONEUM_THROW(code, msg)
Throw an exception with a custom msg, current ZMQ error code, filename, and line number.
Definition at line 53 of file zmq.h.
53#define ELECTRONEUM_ZMQ_THROW(msg) \
54 ELECTRONEUM_THROW( ::net::zmq::get_error_code(), msg )