Sha256: d0b4b8f51908b6eb378cc7e78f214813c46d3a02c3acd7a4ba639558e7188529

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

module PageEz
  class Error < StandardError; end

  class PluralizationMismatchError < StandardError; end

  class MatcherCollisionError < StandardError; end

  class DuplicateElementDeclarationError < StandardError; end

  class InvalidSelectorError < StandardError; end

  def self.reraise_selector_error(selector)
    yield
  rescue Nokogiri::CSS::SyntaxError => e
    raise InvalidSelectorError, "Invalid selector '#{selector}':\n#{e.message}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page_ez-0.2.0 lib/page_ez/errors.rb
page_ez-0.1.0 lib/page_ez/errors.rb