From: Robert Klemme Date: 2009-12-09T22:24:41+09:00 Subject: Re: Newbie question: what exceptions are thrown by FTP class 2009/12/8 Simon Morgan : > Really I’m after something along the lines of what Java’s JavaDoc might > give which lists the thrown exceptions and the reasons why e.g.: > http://java.sun.com/javase/6/docs/api/ (I’m from a Java background). Do > you know if this exists or if there is a tool that can generate this > sort of info? There can be no tool that works under all circumstances because a) exceptions are not declared as checked exceptions in Java are and b) the code of a Ruby class can change any time (including throwing new exceptions). While that may sound a bit theoretical it explains why probably nobody has bothered so far to come up with the tool you are requesting. (Note, even in Java you can create such a situation by using unchecked exceptions and delegate at some place in code to instances of different classes all of which do not necessarily have to be known at compile time.) You can look at the sources as Brian suggested or try to provoke different error situations (i.e. using a hostname that does not exist, using a wrong user, retrieving a file which you know is not on the server etc.) and see what happens. More often than not though it is probably sufficient to catch some basic errors as Brian suggested. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/