Raised by Timeout.timeout when the block times out.
      Attributes
    
  
          
            Read
          
        
      
          No documentation available
        
    
      Class Methods
    
  
          
            2.5
          
          
            View on GitHub
            
          
        
        
          
            # File tmp/rubies/ruby-2.5.9/lib/timeout.rb, line 30
def self.catch(*args)
  exc = new(*args)
  exc.instance_variable_set(:@thread, Thread.current)
  ::Kernel.catch(exc) {yield exc}
end
          
        
      No documentation available
      
      Instance Methods
    
  
          
            2.5
          
          
            View on GitHub
            
          
        
        
          
            # File tmp/rubies/ruby-2.5.9/lib/timeout.rb, line 36
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
          
        
      No documentation available