Sha256: 68cc6b768d6458eac32cc70cf58b7c28e87492adf8feba1112e4bfda4e3de0f7
Contents?: true
Size: 519 Bytes
Versions: 1
Compression:
Stored size: 519 Bytes
Contents
module Http module Exceptions class HttpException < RuntimeError attr_reader :response, :original_exception def initialize(options = {}) @original_exception = options[:original_exception] @response = options[:response] msg = 'An error has occurred while processing response.' msg += " Status #{response.code}\n#{response.body}" if response msg += " Original Exception: #{original_exception}" if original_exception super msg end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
http-exceptions-0.1.6 | lib/http/exceptions/http_exception.rb |