Exception: KubeException

Inherits:
Exception
  • 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) ⇒ KubeException

Returns a new instance of KubeException.



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

def initialize(error_code, message)
  @error_code = error_code
  @message = message
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

Instance Method Details

#to_sObject



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

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