Exception: Azure::Armrest::ApiException

Inherits:
Exception
  • Object
show all
Defined in:
lib/azure/armrest/exception.rb

Instance Attribute Summary collapse

Attributes inherited from Exception

#cause, #message

Instance Method Summary collapse

Constructor Details

#initialize(code, message, cause_exception) ⇒ ApiException

Create a new ApiException class. The code is the error code.

This class serves as the parent



42
43
44
45
# File 'lib/azure/armrest/exception.rb', line 42

def initialize(code, message, cause_exception)
  @code = code
  super(message, cause_exception)
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



37
38
39
# File 'lib/azure/armrest/exception.rb', line 37

def code
  @code
end

Instance Method Details

#to_sObject

A stringified version of the error. If self is a plain ApiException, then the cause is included to aid in debugging.



50
51
52
# File 'lib/azure/armrest/exception.rb', line 50

def to_s
  "[#{code}] #{super}"
end