lib/serially/task.rb
# <i>instance</i> - instance on which the error handler should be run
# <i>result_msg</i> - result message string, returned by the task callback. Can be nil, if no string was returned by the task
# <i>result_obj</i> - result object, returned by the task callback. Can be nil, if no object was returned by the task
instance - instance on which the error handler should be run
result_msg - result message string, returned by the task callback. Can be nil, if no string was returned by the task
result_obj - result object, returned by the task callback. Can be nil, if no object was returned by the task
instance - instance on which the error handler should be run result_msg - result message string returned by the task callback . Can be nil if no string was returned by the task result_obj - result object returned by the task callback . Can be nil if no object was returned by the task
def on_error!(instance, result_msg, result_obj)
      if options[:on_error]
        if !klass.method_defined?(options[:on_error])
          raise Serially::ConfigurationError.new("Serially: error handler #{options[:on_error]} not found for task #{self.name}")
        end
        begin
          status = instance.send(options[:on_error], result_msg, result_obj)
        rescue StandardError => exc
          Resque.logger.error("Serially: error handler for task '#{@name}' raised exception: #{exc.message}")
          status = false
        end
        status
      end
    end
def on_error! ( instance , result_msg , result_obj ) if options [ :on_error ] if ! klass . method_defined? ( options [ :on_error ] ) raise Serially :: ConfigurationError . new ( "Serially: error handler #{options[:on_error]} not found for task #{self.name}" ) end begin status = instance . send ( options [ :on_error ] , result_msg , result_obj ) rescue StandardError => exc Resque . logger . error ( "Serially: error handler for task '#{@name}' raised exception: #{exc.message}" ) status = false end status end end
<i>instance</i> - instance on which the error handler should be run
<i>result_msg</i> - result message string, returned by the task callback.
<i > instance< / i > - instance on which the error handler should be run <i > result_msg< / i > - result message string returned by the task callback .
instance
result_msg
result_obj