Exception: Ably::Exceptions::ConnectionError

Inherits:
BaseAblyException show all
Defined in:
lib/ably/exceptions.rb

Overview

Connection error from Realtime or REST service

Instance Attribute Summary

Attributes inherited from BaseAblyException

#code, #message, #request_id, #status

Instance Method Summary collapse

Methods inherited from BaseAblyException

#as_json

Constructor Details

#initialize(message, status = nil, code = nil, base_exception = nil, options = {}) ⇒ ConnectionError

Returns a new instance of ConnectionError


80
81
82
# File 'lib/ably/exceptions.rb', line 80

def initialize(message, status = nil, code = nil, base_exception = nil, options = {})
  super message, status, code, base_exception, options
end

Instance Method Details

#to_sObject


84
85
86
87
88
89
90
91
92
93
# File 'lib/ably/exceptions.rb', line 84

def to_s
  message = [super]
  if @base_exception
    message << "#{@base_exception}"
    if @base_exception.respond_to?(:message) && @base_exception.message.match(/certificate verify failed/i)
      message << "See https://goo.gl/eKvfcR to resolve this issue."
    end
  end
  message.join(' < ')
end