Exception: Saklient::Errors::HttpException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/saklient/errors/http_exception.rb

Direct Known Subclasses

HttpBadGatewayException, HttpBadRequestException, HttpConflictException, HttpExpectationFailedException, HttpFailedDependencyException, HttpForbiddenException, HttpGatewayTimeoutException, HttpGoneException, HttpHttpVersionNotSupportedException, HttpInsufficientStorageException, HttpInternalServerErrorException, HttpLengthRequiredException, HttpLockedException, HttpMethodNotAllowedException, HttpNotAcceptableException, HttpNotExtendedException, HttpNotFoundException, HttpNotImplementedException, HttpPaymentRequiredException, HttpPreconditionFailedException, HttpProxyAuthenticationRequiredException, HttpRequestEntityTooLargeException, HttpRequestTimeoutException, HttpRequestUriTooLongException, HttpRequestedRangeNotSatisfiableException, HttpServiceUnavailableException, HttpUnauthorizedException, HttpUnprocessableEntityException, HttpUnsupportedMediaTypeException, HttpUpgradeRequiredException, HttpVariantAlsoNegotiatesException

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (HttpException) initialize(status, code = nil, message = '')

Returns a new instance of HttpException

Parameters:

  • status (Fixnum)
  • code (String) (defaults to: nil)
  • message (String) (defaults to: '')


20
21
22
23
24
# File 'lib/saklient/errors/http_exception.rb', line 20

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

Instance Attribute Details

- (String) code

Returns:

  • (String)


15
16
17
# File 'lib/saklient/errors/http_exception.rb', line 15

def code
  @code
end

- (Fixnum) status

Returns:

  • (Fixnum)


12
13
14
# File 'lib/saklient/errors/http_exception.rb', line 12

def status
  @status
end