# File timeout.rb, line 29defself.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 35defexception(*)
# TODO: use Fiber.current to see if self can be thrownifself.thread==Thread.currentbt = callerbeginthrow(self, bt)
rescueUncaughtThrowErrorendendselfend