Sha256: 43ea21534ac6b9d8b8b616f28fa354a1d4c7591a36221a244d6121d7706986bd
Contents?: true
Size: 607 Bytes
Versions: 4
Compression:
Stored size: 607 Bytes
Contents
module Twilio module REST class TwilioException < Exception attr_reader :message, :body def initialize(message, body = nil) @message = message @body = body end def to_s "#{@message}: #{@body || 'no body'}" end end class RestException < TwilioException attr_reader :message, :code, :status_code def initialize(message, code, status_code) @message = message @code = code @status_code = status_code end def to_s "[HTTP #{status_code}] #{code} : #{msg}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems