Exception: Mongoid::Token::CollisionRetriesExceeded

Inherits:
Error
  • Object
show all
Defined in:
lib/mongoid/token/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource = "unknown resource", attempts = "unspecified") ⇒ CollisionRetriesExceeded

Returns a new instance of CollisionRetriesExceeded.



6
7
8
9
# File 'lib/mongoid/token/exceptions.rb', line 6

def initialize(resource = "unknown resource", attempts = "unspecified")
  @resource = resource
  @attempts = attempts
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/mongoid/token/exceptions.rb', line 11

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