Exception: Azure::Armrest::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- Azure::Armrest::Exception
- Defined in:
- lib/azure/armrest/exception.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cause ⇒ Object
Returns the value of attribute cause.
-
#message ⇒ Object
The error message or, if the message is not set, the name of the exception class.
Instance Method Summary collapse
-
#initialize(message = nil, cause_exception = nil) ⇒ Exception
constructor
Create a new Armrest::Exception object.
-
#to_s ⇒ Object
The stringified version (message) of the exception.
Constructor Details
#initialize(message = nil, cause_exception = nil) ⇒ Exception
Create a new Armrest::Exception object. The message
should be an error string, while cause_exception
is typically set to the raw RestClient exception.
You will not typically use this object directly.
13 14 15 16 |
# File 'lib/azure/armrest/exception.rb', line 13 def initialize( = nil, cause_exception = nil) @message = @cause = cause_exception end |
Instance Attribute Details
#cause ⇒ Object
Returns the value of attribute cause.
4 5 6 |
# File 'lib/azure/armrest/exception.rb', line 4 def cause @cause end |
#message ⇒ Object
The error message or, if the message is not set, the name of the exception class.
31 32 33 |
# File 'lib/azure/armrest/exception.rb', line 31 def @message || self.class.name end |
Instance Method Details
#to_s ⇒ Object
The stringified version (message) of the exception.
20 21 22 23 24 25 26 |
# File 'lib/azure/armrest/exception.rb', line 20 def to_s if cause "#{} (cause: #{cause})" else end end |