class Concurrent::Agent
def rescue(clazz = StandardError, &block)
- Yieldparam: ex - the caught exception
Other tags:
- Yield: - the block to be called when a matching exception is caught
Parameters:
-
clazz(Exception) -- the class of exception to catch
def rescue(clazz = StandardError, &block) unless block.nil? mutex.synchronize do @rescuers << Rescuer.new(clazz, block) end end self end