Exception: Excon::Errors::SocketError
- Defined in:
- lib/excon/errors.rb
Instance Attribute Summary collapse
-
#socket_error ⇒ Object
readonly
Returns the value of attribute socket_error.
Instance Method Summary collapse
-
#initialize(socket_error = nil) ⇒ SocketError
constructor
A new instance of SocketError.
Constructor Details
#initialize(socket_error = nil) ⇒ SocketError
Returns a new instance of SocketError.
10 11 12 13 14 15 16 17 18 |
# File 'lib/excon/errors.rb', line 10 def initialize(socket_error=nil) if socket_error. =~ /certificate verify failed/ super("Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `ENV['SSL_CERT_DIR'] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, `ENV['SSL_CERT_FILE'] = path_to_file` or `Excon.defaults[:ssl_verify_peer] = false` (less secure).") else super("#{socket_error.} (#{socket_error.class})") end set_backtrace(socket_error.backtrace) @socket_error = socket_error end |
Instance Attribute Details
#socket_error ⇒ Object (readonly)
Returns the value of attribute socket_error.
8 9 10 |
# File 'lib/excon/errors.rb', line 8 def socket_error @socket_error end |