Sha256: 60b9783a61fd455b1642a4ab102840d15be0eb86136b01971a11333265f06429

Contents?: true

Size: 631 Bytes

Versions: 42

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

class Pagy
  # Generic variable error
  class VariableError < ArgumentError
    attr_reader :pagy, :variable, :value

    # Set the variables and prepare the message
    def initialize(pagy, variable, description, value)
      @pagy     = pagy
      @variable = variable
      @value    = value
      super "expected :#{@variable} #{description}; got #{@value.inspect}"
    end
  end

  # Specific overflow error
  class OverflowError < VariableError; end

  # I18n configuration error
  class I18nError < StandardError; end

  # Generic internal error
  class InternalError < StandardError; end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
pagy-6.2.0 lib/pagy/exceptions.rb
pagy-6.1.0 lib/pagy/exceptions.rb
pagy-6.0.4 lib/pagy/exceptions.rb
pagy-6.0.3 lib/pagy/exceptions.rb
pagy-6.0.2 lib/pagy/exceptions.rb
pagy-6.0.1 lib/pagy/exceptions.rb
pagy-6.0.0 lib/pagy/exceptions.rb
pagy-5.10.1 lib/pagy/exceptions.rb
pagy-5.10.0 lib/pagy/exceptions.rb
pagy-5.9.3 lib/pagy/exceptions.rb
pagy-5.9.2 lib/pagy/exceptions.rb
pagy-5.9.1 lib/pagy/exceptions.rb
pagy-5.9.0 lib/pagy/exceptions.rb
pagy-5.8.1 lib/pagy/exceptions.rb
pagy-5.8.0 lib/pagy/exceptions.rb
pagy-5.7.6 lib/pagy/exceptions.rb
pagy-5.7.5 lib/pagy/exceptions.rb
pagy-5.7.4 lib/pagy/exceptions.rb
pagy-5.7.3 lib/pagy/exceptions.rb
pagy-5.7.2 lib/pagy/exceptions.rb