Exception: Timeout::Error
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
          RuntimeError
         | |
| Instance Chain: 
          self,
          RuntimeError
         | |
| Inherits: | RuntimeError 
 | 
| Defined in: | lib/timeout.rb | 
Overview
Raised by #timeout when the block times out.
Class Method Summary
Instance Attribute Summary
- #thread readonly
Instance Method Summary
Class Method Details
.catch(*args)
[ GitHub ]# File 'lib/timeout.rb', line 29
def self.catch(*args) exc = new(*args) exc.instance_variable_set(:@thread, Thread.current) ::Kernel.catch(exc) {yield exc} end
Instance Attribute Details
#thread (readonly)
[ GitHub ]# File 'lib/timeout.rb', line 27
attr_reader :thread
Instance Method Details
#exception
[ GitHub ]# File 'lib/timeout.rb', line 35
def exception(*) # TODO: use Fiber.current to see if self can be thrown if self.thread == Thread.current bt = caller begin throw(self, bt) rescue UncaughtThrowError end end self end