File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ class message_t
556
556
THROW_ERROR_T;
557
557
memcpy (data (), data_, size_);
558
558
}
559
-
559
+
560
560
void rebuild (const std::string &str)
561
561
{
562
562
rebuild (str.data (), str.size ());
@@ -2731,7 +2731,7 @@ template<typename T = no_user_data> class poller_t
2731
2731
void remove (fd_t fd)
2732
2732
{
2733
2733
if (0 != zmq_poller_remove_fd (poller_ptr.get (), fd)) {
2734
- throw error_t () ;
2734
+ THROW_ERROR_T ;
2735
2735
}
2736
2736
}
2737
2737
@@ -2749,7 +2749,7 @@ template<typename T = no_user_data> class poller_t
2749
2749
if (0
2750
2750
!= zmq_poller_modify_fd (poller_ptr.get (), fd,
2751
2751
static_cast <short >(events))) {
2752
- throw error_t () ;
2752
+ THROW_ERROR_T ;
2753
2753
}
2754
2754
}
2755
2755
@@ -2809,7 +2809,7 @@ template<typename T = no_user_data> class poller_t
2809
2809
if (0
2810
2810
!= zmq_poller_add_fd (poller_ptr.get (), fd, user_data,
2811
2811
static_cast <short >(events))) {
2812
- throw error_t () ;
2812
+ THROW_ERROR_T ;
2813
2813
}
2814
2814
}
2815
2815
};
Original file line number Diff line number Diff line change @@ -810,11 +810,20 @@ class active_poller_t
810
810
const poller_ref_t ref{fd};
811
811
812
812
if (!handler)
813
+ #ifndef CPPZMQ_NO_CPP_EXCEPTIONS
813
814
throw std::invalid_argument (" null handler in active_poller_t::add (fd)" );
815
+ #else
816
+ std::abort ();
817
+ #endif
814
818
auto ret = handlers.emplace (
815
819
ref, std::make_shared<handler_type>(std::move (handler)));
816
820
if (!ret.second )
821
+ #ifndef CPPZMQ_NO_CPP_EXCEPTIONS
817
822
throw error_t (EINVAL); // already added
823
+ #else
824
+ std::abort ();
825
+ #endif
826
+ #ifndef CPPZMQ_NO_CPP_EXCEPTIONS
818
827
try {
819
828
base_poller.add (fd, events, ret.first ->second .get ());
820
829
need_rebuild = true ;
@@ -824,7 +833,10 @@ class active_poller_t
824
833
handlers.erase (ref);
825
834
throw ;
826
835
}
827
-
836
+ #else
837
+ base_poller.add (fd, events, ret.first ->second .get ());
838
+ need_rebuild = true ;
839
+ #endif
828
840
}
829
841
830
842
void remove (zmq::socket_ref socket)
You can’t perform that action at this time.
0 commit comments