Sha256: 53f280b5e18621504f5d9ace1a97dc3f53e87cbda724c28edd1e54f721f24332

Contents?: true

Size: 1.19 KB

Versions: 26

Compression:

Stored size: 1.19 KB

Contents

module OEmbed
  
  # A generic OEmbed-related Error. The OEmbed library does its best to capture all internal
  # errors and wrap them in an OEmbed::Error class so that the error-handling code in your
  # application can more easily identify the source of errors.
  #
  # The following Classes inherit from OEmbed::Error
  # * OEmbed::FormatNotSupported
  # * OEmbed::NotFound
  # * OEmbed::ParseError
  # * OEmbed::UnknownFormat
  # * OEmbed::UnknownResponse
  class Error < StandardError
  end

  # This is a test
  class NotFound < OEmbed::Error # :nodoc:
    def to_s
      "No embeddable content at '#{super}'"
    end
  end

  class UnknownFormat < OEmbed::Error # :nodoc:
    def to_s
      "The provider doesn't support the '#{super}' format"
    end
  end

  class FormatNotSupported < OEmbed::Error # :nodoc:
    def to_s
      "This server doesn't have the correct libraries installed to support the '#{super}' format"
    end
  end

  class UnknownResponse < OEmbed::Error # :nodoc:
    def to_s
      "Got unknown response (#{super}) from server"
    end
  end

  class ParseError < OEmbed::Error # :nodoc:
    def to_s
      "There was an error parsing the server response (#{super})"
    end
  end
    
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
ruby-oembed-0.18.0 lib/oembed/errors.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/ruby-oembed-0.17.0/lib/oembed/errors.rb
ruby-oembed-0.17.0 lib/oembed/errors.rb
ruby-oembed-0.16.1 lib/oembed/errors.rb
ruby-oembed-0.16.0 lib/oembed/errors.rb
ruby-oembed-0.15.0 lib/oembed/errors.rb
ruby-oembed-0.14.1 lib/oembed/errors.rb
ruby-oembed-0.14.0 lib/oembed/errors.rb
ruby-oembed-0.13.1 lib/oembed/errors.rb
ruby-oembed-0.13.0 lib/oembed/errors.rb
ruby-oembed-0.12.0 lib/oembed/errors.rb
ruby-oembed-0.11.0 lib/oembed/errors.rb
ruby-oembed-0.10.1 lib/oembed/errors.rb
ruby-oembed-0.10.0 lib/oembed/errors.rb
ruby-oembed-0.9.0 lib/oembed/errors.rb
ruby-oembed-0.8.14 lib/oembed/errors.rb
ruby-oembed-0.8.13 lib/oembed/errors.rb
ruby-oembed-0.8.12 lib/oembed/errors.rb
ruby-oembed-0.8.11 lib/oembed/errors.rb
ruby-oembed-0.8.10 lib/oembed/errors.rb