Sha256: 22eea7d79631273c990cf694a4931706d6809ae60b559a634805ab33b86ff6e3

Contents?: true

Size: 387 Bytes

Versions: 3

Compression:

Stored size: 387 Bytes

Contents

module Mongoid
  module Ids
    class Error < StandardError; end

    class CollisionRetriesExceeded < Error
      def initialize(resource = "unknown resource", attempts = "unspecified")
        @resource = resource
        @attempts = attempts
      end

      def to_s
        "Failed to generate unique token for #{@resource} after #{@attempts} attempts."
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid-ids-0.1.8 lib/mongoid/ids/exceptions.rb
mongoid-ids-0.1.7 lib/mongoid/ids/exceptions.rb
mongoid-ids-0.1.1 lib/mongoid/ids/exceptions.rb