Exception: Artifactory::Error::HTTPError
- Inherits:
-
ArtifactoryError
- Object
- StandardError
- ArtifactoryError
- Artifactory::Error::HTTPError
- Defined in:
- lib/artifactory/errors.rb
Overview
Class for all HTTP errors
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(hash = {}) ⇒ HTTPError
Returns a new instance of HTTPError.
26 27 28 29 30 31 32 |
# File 'lib/artifactory/errors.rb', line 26 def initialize(hash = {}) @code = hash['status'].to_i @http = hash['message'].to_s super "The Artifactory server responded with an HTTP Error " \ "#{@code}: `#{@http}'" end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
24 25 26 |
# File 'lib/artifactory/errors.rb', line 24 def code @code end |