ZIO
Python and C++ interface to ZeroMQ and Zyre
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 {
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 }
virtual const char * what() const ZMQ_NOTHROW ZMQ_OVERRIDE
Definition: zmq.hpp:249
void init_all()
Definition: main.cpp:22
int main()
Definition: test_errors.cpp:25