Exception: OneviewSDK::OneViewError
- Inherits:
-
StandardError
- Object
- StandardError
- OneviewSDK::OneViewError
- Defined in:
- lib/oneview-sdk/exceptions.rb
Overview
Error class allowing storage of a data attribute
Direct Known Subclasses
BadRequest, ConnectionError, IncompleteResource, InvalidClient, InvalidFormat, InvalidRequest, InvalidResource, InvalidURL, MethodUnavailable, NotFound, RequestError, TaskError, Unauthorized, UnsupportedVariant, UnsupportedVersion
Constant Summary collapse
- MESSAGE =
'(No message)'.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Class Method Summary collapse
-
.raise!(msg = self::MESSAGE, data = nil) ⇒ Object
Shorthand method to raise an error.
Instance Method Summary collapse
-
#initialize(msg = self.class::MESSAGE, data = nil) ⇒ OneViewError
constructor
A new instance of OneViewError.
Constructor Details
#initialize(msg = self.class::MESSAGE, data = nil) ⇒ OneViewError
Returns a new instance of OneViewError.
19 20 21 22 |
# File 'lib/oneview-sdk/exceptions.rb', line 19 def initialize(msg = self.class::MESSAGE, data = nil) @data = data super(msg) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
16 17 18 |
# File 'lib/oneview-sdk/exceptions.rb', line 16 def data @data end |
Class Method Details
.raise!(msg = self::MESSAGE, data = nil) ⇒ Object
Shorthand method to raise an error.
27 28 29 |
# File 'lib/oneview-sdk/exceptions.rb', line 27 def self.raise!(msg = self::MESSAGE, data = nil) raise new(msg, data) end |