>> Really I”Ēm after something along the lines of what Java”Ēs JavaDoc might >> give which lists the thrown exceptions and the reasons why > > If the author includes that in the API documentation, then you'll have > it; if the author doesn't, then I'm afraid you won't. Sigh. I feared that would be the case. > In the case of Net::FTP you can see that the author decided to remove > all of the exception classes from the documentation (:stopdoc:), > presumably to avoid cluttering it up. Yes I spotted that, kinda frustrating that I have to look at the source code to find some of the errors raised. Ah well. >> and this is >> fairly error-prone and time-consuming; e.g. if I call nlst() without a >> network connection, the exception is thrown from nlst > retrlines > >> voidcmd > putline, which is throwing an error from a call to >> TCPSocket.write... > > Indeed. Hence my advice to be generic in your rescue strategy. > > 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. > It has to be said that Ruby's own core documentation is a long way from > complete. Sigh. Thanks very much for your time Brian, it's very much appreciated, I'll see how I adapt. -- Posted via http://www.ruby-forum.com/.