From 1b706ac02858aee4c960331dc7100f8c14312848 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Thu, 27 Oct 2011 11:48:58 +0200 Subject: Enable exceptions raising on assert on Win32 This patch changes the Win32 version to call RaiseException instead of abort (which eventually calls TerminateProcess). This allows crash dumps to be sent correctly instead of the process disappearing. Signed-off-by: Paul Betts --- 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 From ac7717b7b35f441fc3aeeb1528e63f147c00913a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 31 Oct 2011 16:20:30 +0100 Subject: 250bpm copyrights added Signed-off-by: Martin Sustrik --- src/err.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/err.cpp') diff --git a/src/err.cpp b/src/err.cpp index ff81e03..a5f0d0c 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -1,4 +1,5 @@ /* + Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file -- cgit v1.2.3 From 8e21d64c974344b5b2b83cac85d12c51392fe74b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 1 Nov 2011 18:06:11 +0100 Subject: Copyright dates adjusted to reflect reality Signed-off-by: Martin Sustrik --- src/err.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/err.cpp') diff --git a/src/err.cpp b/src/err.cpp index a5f0d0c..028d752 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -1,6 +1,6 @@ /* Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. -- cgit v1.2.3