Exception: KubeException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code, message) ⇒ KubeException

Returns a new instance of KubeException.



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

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.



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

def error_code
  @error_code
end

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

Instance Method Details

#to_sObject



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

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