Class: Error

Inherits:
Protocol show all
Defined in:
lib/cocaine/protocol.rb

Instance Attribute Summary collapse

Attributes inherited from Protocol

#id

Instance Method Summary collapse

Methods inherited from Protocol

#pack, #to_s

Constructor Details

#initialize(errno, reason) ⇒ Error

Returns a new instance of Error.



110
111
112
113
114
# File 'lib/cocaine/protocol.rb', line 110

def initialize(errno, reason)
  super RPC::ERROR
  @errno = errno
  @reason = reason
end

Instance Attribute Details

#errnoObject (readonly)

Returns the value of attribute errno.



107
108
109
# File 'lib/cocaine/protocol.rb', line 107

def errno
  @errno
end

#reasonObject (readonly)

Returns the value of attribute reason.



108
109
110
# File 'lib/cocaine/protocol.rb', line 108

def reason
  @reason
end