Exception: Hpe3parSdk::HPE3PARException
- Inherits:
-
StandardError
- Object
- StandardError
- Hpe3parSdk::HPE3PARException
- Defined in:
- lib/Hpe3parSdk/exceptions.rb
Direct Known Subclasses
ConnectionError, HTTPBadGateway, HTTPBadRequest, HTTPConflict, HTTPError, HTTPExpectationFailed, HTTPForbidden, HTTPGatewayTimeout, HTTPGone, HTTPInternalServerError, HTTPLengthRequired, HTTPMethodNotAllowed, HTTPNotAcceptable, HTTPNotFound, HTTPNotImplemented, HTTPPreconditionFailed, HTTPProxyAuthRequired, HTTPRequestEntityTooLarge, HTTPRequestTimeout, HTTPRequestURITooLong, HTTPRequestedRangeNotSatisfiable, HTTPServiceUnavailable, HTTPTeaPot, HTTPUnauthorized, HTTPUnsupportedMediaType, HTTPVersionNotSupported, RequestException, SSLCertFailed, Timeout, TooManyRedirects, URLRequired, UnsupportedVersion
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
Instance Method Summary collapse
-
#initialize(code = nil, message = nil, ref = nil, http_status = nil) ⇒ HPE3PARException
constructor
A new instance of HPE3PARException.
Constructor Details
#initialize(code = nil, message = nil, ref = nil, http_status = nil) ⇒ HPE3PARException
Returns a new instance of HPE3PARException.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/Hpe3parSdk/exceptions.rb', line 16 def initialize(code = nil, =nil, ref =nil, http_status=nil) @code = code @message = @ref = ref @http_status = http_status formatted_string = 'Error: ' if @http_status formatted_string += ' (HTTP %s)' % @http_status end if @code formatted_string += ' API code: %s' % @code end if @message formatted_string += ' - %s' % @message end if @ref formatted_string += ' - %s' % @ref end super(formatted_string) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
14 15 16 |
# File 'lib/Hpe3parSdk/exceptions.rb', line 14 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
14 15 16 |
# File 'lib/Hpe3parSdk/exceptions.rb', line 14 def http_status @http_status end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
14 15 16 |
# File 'lib/Hpe3parSdk/exceptions.rb', line 14 def @message end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
14 15 16 |
# File 'lib/Hpe3parSdk/exceptions.rb', line 14 def ref @ref end |