[zeromq-dev] [PATCH] Add function to zmq::error_t to access errnum
Peter Bourgon
zeromq.peter at bourgon.org
Thu Oct 28 18:50:01 CEST 2010
A quick patch, as discussed with sustrik on #zeromq, to expose errnum
from zmq::error_t.
Let me know if I've screwed anything up :)
-----
>From d9f88f5671fde67496129081feabc33dcf136740 Mon Sep 17 00:00:00 2001
From: Peter Bourgon <peter.bourgon at gmail.com>
Date: Thu, 28 Oct 2010 18:40:20 +0200
Subject: [PATCH] Add function to zmq::error_t to access errnum
Signed-off-by: Peter Bourgon <peter.bourgon at gmail.com>
---
include/zmq.hpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/zmq.hpp b/include/zmq.hpp
index 4cfcdce..7b2d0b2 100644
--- a/include/zmq.hpp
+++ b/include/zmq.hpp
@@ -43,6 +43,11 @@ namespace zmq
return zmq_strerror (errnum);
}
+ int num () const
+ {
+ return errnum;
+ }
+
private:
int errnum;
--
1.7.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-function-to-zmq-error_t-to-access-errnum.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101028/edc3136b/attachment.bin>
More information about the zeromq-dev
mailing list