Module: MarcReader::LoggingNextRecord

Defined in:
lib/marc4j4r/reader.rb

Instance Method Summary collapse

Instance Method Details

#nextRecord(hashify = true) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/marc4j4r/reader.rb', line 6

def nextRecord(hashify=true)
  begin
    r = self.next
  # rescue  Java::org.marc4j.MarcException => e
  rescue   org.marc4j.MarcException => e
    puts "#{e}"
    raise e
  end
  self.logErrors if self.methods.include? 'errors'
  r.hashify if hashify
  return r
end