ZIO
Python and C++ interface to ZeroMQ and Zyre
test
test_errors.cpp
Go to the documentation of this file.
1
#include "
zio/interned.hpp
"
2
#include "
zio/main.hpp
"
3
#include "
zio/logging.hpp
"
4
5
static
6
void
test_socket()
7
{
8
zio::init_all
();
9
zio::context_t
ctx
;
10
zio::socket_t
s(ctx, ZMQ_PUB);
11
try
{
12
s.bind(
"wrong"
);
13
}
14
catch
(
zio::error_t
& se) {
15
zio::debug
(
"Correctly caught {}"
, se.
what
());
16
}
17
try
{
18
s.connect(
"wrong"
);
19
}
20
catch
(
zio::error_t
& se) {
21
zio::debug
(
"Correctly caught {}"
, se.
what
());
22
}
23
}
24
25
int
main
()
26
{
27
test_socket();
28
return
0;
29
}
zmq::error_t::what
virtual const char * what() const ZMQ_NOTHROW ZMQ_OVERRIDE
Definition:
zmq.hpp:249
test_ugly.ctx
ctx
Definition:
test_ugly.py:158
interned.hpp
zmq::socket_t
Definition:
zmq.hpp:1621
logging.hpp
zio::init_all
void init_all()
Definition:
main.cpp:22
main
int main()
Definition:
test_errors.cpp:25
zio::level::debug
Definition:
message.hpp:20
main.hpp
zmq::context_t
Definition:
zmq.hpp:686
zmq::error_t
Definition:
zmq.hpp:245
Generated by
1.8.13