Exception: KubeException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kubeclient/kube_exception.rb

Overview

Kubernetes HTTP Exceptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code, message, response) ⇒ KubeException

Returns a new instance of KubeException.



5
6
7
8
9
# File 'lib/kubeclient/kube_exception.rb', line 5

def initialize(error_code, message, response)
  @error_code = error_code
  @message = message
  @response = response
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



3
4
5
# File 'lib/kubeclient/kube_exception.rb', line 3

def error_code
  @error_code
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/kubeclient/kube_exception.rb', line 3

def message
  @message
end

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/kubeclient/kube_exception.rb', line 3

def response
  @response
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/kubeclient/kube_exception.rb', line 11

def to_s
  'HTTP status code ' + @error_code.to_s + ', ' + @message
end