code/superant.com.rwdmovies/viewrwdmoviesconfiguration.rb in rwdmovies-0.93 vs code/superant.com.rwdmovies/viewrwdmoviesconfiguration.rb in rwdmovies-0.94

- old
+ new

@@ -1,22 +1,22 @@ #view the configuration record - def viewrwdmoviesconfiguration - require 'fileutils' - begin # exception trapped block - - Dir.chdir($progdir) - rwdmoviesconfigurationfile = File.join( "configuration", "rwdmovies.cnf" ) - if File.exist?(rwdmoviesconfigurationfile) - fd = File.open(rwdmoviesconfigurationfile,"r") - @rwdmoviesconfigurationtext = " " - while ! fd.eof? - @rwdmoviesconfigurationtext = fd.read - end - fd.close - else - @rwdmoviesconfigurationtext = "File error" - end - rescue SystemCallError, StandardError - $stderr.print "system call error: " + $! - @rwdmoviesconfigurationtext = "File error" - end # exception rescue - end +def viewrwdmoviesconfiguration + require 'fileutils' + begin # exception trapped block + + Dir.chdir($progdir) + rwdmoviesconfigurationfile = File.join( "configuration", "rwdmovies.cnf" ) + if File.exist?(rwdmoviesconfigurationfile) + fd = File.open(rwdmoviesconfigurationfile,"r") + @rwdmoviesconfigurationtext = " " + while ! fd.eof? + @rwdmoviesconfigurationtext = fd.read + end + fd.close + else + @rwdmoviesconfigurationtext = "File error" + end + rescue SystemCallError, StandardError + $stderr.print "system call error: " + $! + @rwdmoviesconfigurationtext = "File error" + end # exception rescue +end