Sha256: 426651a943133171c8e0c4d881aa33cd2d0172f61fa34568f694b478ca97088c

Contents?: true

Size: 717 Bytes

Versions: 10

Compression:

Stored size: 717 Bytes

Contents

# frozen_string_literal: true

module PaperTrail
  # Generic PaperTrail exception.
  # @api public
  class Error < StandardError
  end

  # An unexpected option, perhaps a typo, was passed to a public API method.
  # @api public
  class InvalidOption < Error
  end

  # The application's database schema is not supported.
  # @api public
  class UnsupportedSchema < Error
  end

  # The application's database column type is not supported.
  # @api public
  class UnsupportedColumnType < UnsupportedSchema
    def initialize(method:, expected:, actual:)
      super(
        format(
          "%s expected %s column, got %s",
          method,
          expected,
          actual
        )
      )
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
paper_trail-16.0.0 lib/paper_trail/errors.rb
paper_trail-15.2.0 lib/paper_trail/errors.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/paper_trail-12.3.0/lib/paper_trail/errors.rb
paper_trail-15.1.0 lib/paper_trail/errors.rb
paper_trail-15.0.0 lib/paper_trail/errors.rb
paper_trail-14.0.0 lib/paper_trail/errors.rb
paper_trail-13.0.0 lib/paper_trail/errors.rb
paper_trail-12.3.0 lib/paper_trail/errors.rb
paper_trail-12.2.0 lib/paper_trail/errors.rb
paper_trail-12.1.0 lib/paper_trail/errors.rb