Exception: Mongoid::Errors::InMemoryRegexpTimeout

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/in_memory_regexp_timeout.rb

Overview

This error is raised when evaluating a query in memory exceeds Mongoid::Config.in_memory_regexp_time_limit.

What the limit bounds depends on the Ruby in use. Where per-Regexp timeouts are available it is the time spent executing regular expressions; elsewhere it is the elapsed time of the whole in-memory evaluation. The message is worded to hold either way.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(limit) ⇒ InMemoryRegexpTimeout

Create the new error.

Examples:

Create the new in-memory regexp timeout error.

InMemoryRegexpTimeout.new(5.0)


21
22
23
# File 'lib/mongoid/errors/in_memory_regexp_timeout.rb', line 21

def initialize(limit)
  super(compose_message('in_memory_regexp_timeout', limit: limit))
end