Exception: RabbitMQ::FFI::Error Private

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/rabbitmq/ffi/error.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ Error

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Error.



6
7
8
# File 'lib/rabbitmq/ffi/error.rb', line 6

def initialize(message=nil)
  @message = message
end

Class Attribute Details

.lookup_tableObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



24
25
26
# File 'lib/rabbitmq/ffi/error.rb', line 24

def lookup_table
  @lookup_table
end

Class Method Details

.lookup(status) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
# File 'lib/rabbitmq/ffi/error.rb', line 27

def self.lookup status
  lookup_table.fetch(status)
end

Instance Method Details

#messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
15
16
# File 'lib/rabbitmq/ffi/error.rb', line 10

def message
  if @message && status_message; "#{status_message} - #{@message}"
  elsif @message;                @message
  elsif status_message;          status_message
  else;                          ""
  end
end

#status_messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/rabbitmq/ffi/error.rb', line 18

def status_message
  nil
end