summaryrefslogtreecommitdiff
path: root/src/err.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-10-27 11:21:01 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-10-27 11:21:01 +0200
commita8362abf11b51dd553766fb07a9e60f28e788126 (patch)
treebd2f3dc4f9d7eada43c09a4e0b861f9b29b0b8d9 /src/err.cpp
parenta70bea01cc9c81a59d0b7067e8854fc9777f5757 (diff)
Enable exceptions raising on assert on Win32
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/err.cpp')
-rw-r--r--src/err.cpp13
1 files changed, 13 insertions, 0 deletions
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()