mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 10:33:52 +01:00
Add ctor to error_t taking errno and add noexcept specifiers
This commit is contained in:
parent
8b64a341ac
commit
3e3fe85b33
5
zmq.hpp
5
zmq.hpp
@ -250,12 +250,13 @@ typedef zmq_pollitem_t pollitem_t;
|
||||
class error_t : public std::exception
|
||||
{
|
||||
public:
|
||||
error_t() : errnum(zmq_errno()) {}
|
||||
error_t() ZMQ_NOTHROW : errnum(zmq_errno()) {}
|
||||
explicit error_t(int err) ZMQ_NOTHROW : errnum(err) {}
|
||||
virtual const char *what() const ZMQ_NOTHROW ZMQ_OVERRIDE
|
||||
{
|
||||
return zmq_strerror(errnum);
|
||||
}
|
||||
int num() const { return errnum; }
|
||||
int num() const ZMQ_NOTHROW { return errnum; }
|
||||
|
||||
private:
|
||||
int errnum;
|
||||
|
Loading…
Reference in New Issue
Block a user