Method: Cond::DSL#handle

Defined in:
lib/cond/dsl_definition.rb

#handle(arg, message = "", &block) ⇒ Object

Define a handler.

The exception instance is passed to the block.



25
26
27
28
# File 'lib/cond/dsl_definition.rb', line 25

def handle(arg, message = "", &block)
  Cond.check_context(:handle)
  Cond.code_section_stack.last.handle(arg, message, &block)
end