Exception: SWD::HttpError

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

Direct Known Subclasses

BadRequest, Forbidden, NotFound, Unauthorized

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, message = nil, response = nil) ⇒ HttpError

Returns a new instance of HttpError.



6
7
8
9
10
# File 'lib/swd/exception.rb', line 6

def initialize(status, message = nil, response = nil)
  super message
  @status = status
  @response = response
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



5
6
7
# File 'lib/swd/exception.rb', line 5

def response
  @response
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/swd/exception.rb', line 5

def status
  @status
end