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.


86
87
88
# File 'lib/ably/exceptions.rb', line 86

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

Instance Method Details

#to_sObject


90
91
92
93
94
95
96
97
98
99
# File 'lib/ably/exceptions.rb', line 90

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