module Phlanket::Exceptions
We will a create an exception for each status code, see www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Constants
- EXCEPTIONS_MAP
Map http status codes to the corresponding exception class
Public Class Methods
generate_from_response(response)
click to toggle source
# File lib/phlanket/exception.rb, line 91 def self.generate_from_response(response) (EXCEPTIONS_MAP[response.code] || Exception).new(response) end