From: Brian Candler Date: 2009-12-09T22:37:55+09:00 Subject: Re: Newbie question: what exceptions are thrown by FTP class Simon Morgan wrote: >> But *why* would you be calling nlst on a connection which isn't open? >> Isn't that a programmer error, and therefore you shouldn't be catching >> the exception at all? >> > > If the network connection dies between opening and calling nlst(), for > example. OK, I see. In that case you would probably get something like an Errno::EPIPE (writing to a socket where the read end is closed). I don't think you really want to enumerate all the possibilities though. Just rescue SystemCallError which is the parent of all the exceptions in module Errno. -- Posted via http://www.ruby-forum.com/.