Module: Bundesstrasse::Errors

Included in:
Context, Device, Socket
Defined in:
lib/bundesstrasse/errors.rb

Instance Method Summary collapse

Instance Method Details

#errnoObject



15
16
17
# File 'lib/bundesstrasse/errors.rb', line 15

def errno
  ZMQ::Util.errno
end

#error_check(&block) ⇒ Object

Raises:



23
24
25
26
27
28
29
# File 'lib/bundesstrasse/errors.rb', line 23

def error_check(&block)
  if (res = block.call).is_a? Fixnum
    res = res >= 0
  end
  raise ZMQError.new(error_string, errno) unless res
  res
end

#error_stringObject



19
20
21
# File 'lib/bundesstrasse/errors.rb', line 19

def error_string
  ZMQ::Util.error_string
end