diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-10-27 11:21:01 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-10-27 11:21:01 +0200 |
commit | a8362abf11b51dd553766fb07a9e60f28e788126 (patch) | |
tree | bd2f3dc4f9d7eada43c09a4e0b861f9b29b0b8d9 /src/err.cpp | |
parent | a70bea01cc9c81a59d0b7067e8854fc9777f5757 (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.cpp | 13 |
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() |