# this method views an existing record def loadmovierecord require 'fileutils' @a_moviefilename = $currentmovietext begin # exception trapped block fileName = $rwdmovies_directory + "/" + $currentmovietext + ".nam" fd = File.open(fileName,"r") @a_moviename = fd.readline.chomp @a_moviedirector = fd.readline.chomp @a_movieactors = fd.readline.chomp @a_movieyear = fd.readline.chomp @a_moviestudio = fd.readline.chomp @a_moviecomment1 = fd.readline.chomp @a_moviecomment2 =fd.readline.chomp @a_moviecomment3 = fd.readline.chomp while ! fd.eof? @extramoviedatadisplay = fd.readline end fd.close rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end