def viewevent require 'fileutils' $currenteventtext = "%s" % [@a_viewevent] begin # exception trapped block fileName = $rwdschedule_directory + "/" + $currenteventtext + ".sch" fd = File.open(fileName,"r") @displayevent = " " while ! fd.eof? @displayevent = fd.read end fd.close rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end