Class: Http::Exceptions::Configuration
- Inherits:
-
Object
- Object
- Http::Exceptions::Configuration
- Defined in:
- lib/http/exceptions/configuration.rb
Constant Summary collapse
- DEFAULT_EXCEPTIONS_TO_CONVERT =
[ SocketError, Errno::ETIMEDOUT, (Net.const_defined?(:ReadTimeout) ? Net::ReadTimeout : EOFError), (Net.const_defined?(:OpenTimeout) ? Net::OpenTimeout : EOFError), Net::ProtocolError, Errno::ECONNREFUSED, Errno::EHOSTDOWN, Errno::ECONNRESET, Errno::ENETUNREACH, Errno::EHOSTUNREACH, Errno::ECONNABORTED, OpenSSL::SSL::SSLError, EOFError, ].uniq.freeze
Instance Attribute Summary collapse
-
#exceptions_to_convert ⇒ Object
Exception classes to be converted to Http::Exceptions::HttpException.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 |
# File 'lib/http/exceptions/configuration.rb', line 31 def initialize self.exceptions_to_convert = DEFAULT_EXCEPTIONS_TO_CONVERT end |
Instance Attribute Details
#exceptions_to_convert ⇒ Object
Exception classes to be converted to Http::Exceptions::HttpException
29 30 31 |
# File 'lib/http/exceptions/configuration.rb', line 29 def exceptions_to_convert @exceptions_to_convert end |