From: Robert Klemme Date: 2009-10-27T17:28:50+09:00 Subject: Re: file open failure test 2009/10/26 Derek Smith : > OK so in relation, I want to have a method for whose responsibility > is logging runtime errors such as failures to open or run OS commands. > However, when I intentionally made it fail, like putting in a non OS > command > it does not log?  Any help on this or best practices? You could start by omitting unnecessary string interpolation as you do with RUNLOG all the time. Also, why don't you put the weekday hash into a constant as well? Btw, you could use an Array for this as well. DAYS = %w{Sun Mon Tue} # ... Other than that right now I don't have the time to further analyze your example (which also seems to be missing something, e.g. definition of die_mtd). FileUtils.touch throws an exception if it fails. I believe you should make yourself familiar with the concept of exception handling before diving further into this project. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/