# File timeout.rb, line 30defself.catch(*args)
exc = new(*args)
exc.instance_variable_set(:@thread, Thread.current)
::Kernel.catch(exc) {yieldexc}
end
Public Instance Methods
exception(*)click to toggle source
# File timeout.rb, line 36defexception(*)
# TODO: use Fiber.current to see if self can be thrownifself.thread==Thread.currentbt = callerbeginthrow(self, bt)
rescueUncaughtThrowErrorendendselfend