# File lib/ruote/worker.rb, line 283
    def handle_step_error(err, msg)

      $stderr.puts '#' * 80
      $stderr.puts
      $stderr.puts '** worker#step intercepted exception **'
      $stderr.puts
      $stderr.puts "Please report issue or fix your #{@storage.class} impl,"
      $stderr.puts
      $stderr.puts "or override Ruote::Worker#handle_step_error(e, msg) so that"
      $stderr.puts "the issue is dealt with appropriately. For example:"
      $stderr.puts
      $stderr.puts "    class Ruote::Worker"
      $stderr.puts "      def handle_step_error(e, msg)"
      $stderr.puts "        logger.error('ruote step error: ' + e.inspect)"
      $stderr.puts "        mailer.send_error('admin@acme.com', e)"
      $stderr.puts "      end"
      $stderr.puts "    end"
      $stderr.puts
      $stderr.puts '# ' * 40
      $stderr.puts
      $stderr.puts 'error class/message/backtrace:'
      $stderr.puts err.class.name
      $stderr.puts err.message.inspect
      $stderr.puts *err.backtrace
      $stderr.puts err.details if err.respond_to?(:details)
      $stderr.puts
      $stderr.puts 'msg:'
      if msg && msg.is_a?(Hash)
        $stderr.puts msg.select { |k, v|
          %w[ action wfid fei ].include?(k)
        }.inspect
      else
        $stderr.puts msg.inspect
      end
      $stderr.puts
      $stderr.puts '#' * 80

      $stderr.flush
    end