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