Method: Doable::Job#handle

Defined in:
lib/doable/job.rb

#handle(exception, &block) ⇒ Object

Register a handler for named exception

Parameters:

  • exception (String, StandardError)

    Exception to register handler for

  • block (Proc)


122
123
124
# File 'lib/doable/job.rb', line 122

def handle(exception, &block)
  @handlers[exception] = Step.new(self, &block)
end