Sha256: d728fa07720db4ec34fe0ef511c7ac326b3e9d770d60a27b79eb65b04be3b0b2

Contents?: true

Size: 627 Bytes

Versions: 7

Compression:

Stored size: 627 Bytes

Contents

module TD
  class MissingLibPathError < StandardError
    def initialize(message = 'Please, configure the path to tdlibjson library')
      super
    end
  end

  # Proxy class that is used in failed promises to represent TDlib errors
  class Error < StandardError
    def initialize(td_error)
      @td_error = td_error
    end

    def method_missing(method, *args)
      @td_error.public_send(method, *args)
    end

    def respond_to_missing?(*args)
      @td_error.respond_to?(*args)
    end

    def to_s
      @td_error.inspect
    end

    def message
      @td_error.message
    end

    alias inspect to_s
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tdlib-ruby-3.1.0 lib/tdlib/errors.rb
tdlib-ruby-3.0.2 lib/tdlib/errors.rb
tdlib-ruby-3.0.1 lib/tdlib/errors.rb
tdlib-ruby-3.0.0 lib/tdlib/errors.rb
tdlib-ruby-2.2.0 lib/tdlib/errors.rb
tdlib-ruby-2.1.0 lib/tdlib/errors.rb
tdlib-ruby-2.0.0 lib/tdlib/errors.rb