From: Paul Brannan Date: 2002-09-19T05:02:16+09:00 Subject: Re: How best to use exceptions? On Thu, Sep 19, 2002 at 03:50:02AM +0900, Robert McGovern wrote: > def readTag(filename) > raise ArgumentError, "File does not exist" \ > unless FileTest.exist? filename > raise IOError, "File is not readable" \ > unless FileTest.readable? filename > > > end If you are using your exceptions to generate error messages that the user will see, then this seems reasonable, since sometimes the builtin methods don't give error messages that the user can understand. What you have is unnecessary, though, since File.open will already raise an exception if the file does not exist or is not readable. Paul