Module: ZMQ
- Defined in:
- lib/0mq.rb,
lib/0mq/poll.rb,
lib/0mq/curve.rb,
lib/0mq/proxy.rb,
lib/0mq/socket.rb,
lib/0mq/context.rb,
lib/0mq/version.rb,
lib/0mq/error_map.rb,
lib/0mq/socket/options.rb,
lib/0mq/poll_interruptible.rb
Overview
:nodoc:
Defined Under Namespace
Classes: Context, Curve, Poll, PollInterruptible, Proxy, Socket, Version
Constant Summary collapse
- DefaultContext =
The default context to be used if another context is not provided.
Context.new
- ErrorMap =
A hash of error number => exception class. Example: 1 => Errno::EPERM
Hash.new
Class Method Summary collapse
-
.error_check(adjust_backtrace = false) ⇒ Object
Checks the libzmq global error number and raises it as an exception.
-
.version ⇒ Object
Returns a ZMQ::Version object containing the libzmq library version.
Class Method Details
.error_check(adjust_backtrace = false) ⇒ Object
Checks the libzmq global error number and raises it as an exception. Should be used after calling a libzmq resource that returns -1 on error. Example: ZMQ.error_check if rc == -1
17 18 19 20 21 22 23 24 |
# File 'lib/0mq/error_map.rb', line 17 def self.error_check(adjust_backtrace=false) errno = LibZMQ.zmq_errno return true if errno == 25 # TODO: Use adjust_backtrace str = '' raise ErrorMap[errno], str, caller[0...-2] end |