Class: Wukong::Processor::Serializer

Inherits:
Wukong::Processor show all
Defined in:
lib/wukong/widget/serializers.rb

Constant Summary

Constants inherited from Wukong::Processor

SerializerError

Instance Method Summary collapse

Methods inherited from Wukong::Processor

configure, consumes, description, #expected_record_type, #expected_serialization, #finalize, #perform_action, #process, produces, #receive_action, #setup, #stop, valid_serializer?, validate_and_set_serialization

Methods included from Logging

included

Methods included from Hanuman::StageClassMethods

#builder, #label, #register, #set_builder

Instance Method Details

#handle_error(record, err) ⇒ Object



9
10
11
12
13
14
# File 'lib/wukong/widget/serializers.rb', line 9

def handle_error(record, err)
  case on_error
  when 'log'    then log.warn "#{err.class}: #{err.message}"
  when 'notify' then notify('error', record: record, error: err)
  end          
end