From a8362abf11b51dd553766fb07a9e60f28e788126 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 27 Oct 2011 11:21:01 +0200 Subject: Enable exceptions raising on assert on Win32 Signed-off-by: Martin Sustrik --- src/err.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/err.cpp') diff --git a/src/err.cpp b/src/err.cpp index f374de9..ff81e03 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -62,6 +62,19 @@ const char *zmq::errno_to_string (int errno_) } } +void zmq::zmq_abort(const char *errmsg_) +{ +#if defined ZMQ_HAVE_WINDOWS + + // Raise STATUS_FATAL_APP_EXIT. + ULONG_PTR extra_info [1]; + extra_info [0] = (ULONG_PTR) errmsg_; + RaiseException (0x40000015, EXCEPTION_NONCONTINUABLE, 1, extra_info); +#else + abort (); +#endif +} + #ifdef ZMQ_HAVE_WINDOWS const char *zmq::wsa_error() -- cgit v1.2.3