Exception: TableStoreServiceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/tablestore/error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_status, code, message, request_id = '') ⇒ TableStoreServiceError

Returns a new instance of TableStoreServiceError.



30
31
32
33
34
35
# File 'lib/tablestore/error.rb', line 30

def initialize(http_status, code, message, request_id = '')
  @http_status = http_status
  @code = code
  @message = message
  @request_id = request_id
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



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

def code
  @code
end

#http_statusObject

Returns the value of attribute http_status.



26
27
28
# File 'lib/tablestore/error.rb', line 26

def http_status
  @http_status
end

#messageObject

Returns the value of attribute message.



25
26
27
# File 'lib/tablestore/error.rb', line 25

def message
  @message
end

#request_idObject

Returns the value of attribute request_id.



28
29
30
# File 'lib/tablestore/error.rb', line 28

def request_id
  @request_id
end

Class Method Details

.stringObject



37
38
39
# File 'lib/tablestore/error.rb', line 37

def self.string
  "ErrorCode: #{@code}, ErrorMessage: #{@message}, RequestID: #{@request_id}"
end

Instance Method Details

#get_error_codeObject



49
50
51
# File 'lib/tablestore/error.rb', line 49

def get_error_code
  @code
end

#get_error_messageObject



45
46
47
# File 'lib/tablestore/error.rb', line 45

def get_error_message
  @message
end

#get_http_statusObject



41
42
43
# File 'lib/tablestore/error.rb', line 41

def get_http_status
  @http_status
end

#get_request_idObject



53
54
55
# File 'lib/tablestore/error.rb', line 53

def get_request_id
  @request_id
end