Jon Baer
1/19/2006 4:27:00 PM
Hi,
Ive become a pretty big fan of Ruby in the past month during my time
off and while going through PickAxe book and looking around Im not
sure if im missing something fundamental about exceptions ... (bare
w/ me as I am a Java/PHP convert)
Normally when developing an API you can express what exceptions may
occur when invoking a particular method ...
public foobar() throws BadFooBarException
In Ruby, it would seem to me that nearly ~everything~ can throw at
least one exception (or at least cause NameError), so Im wondering at
least how you would document that your method should be placed in a
begin/rescue/end block from a custom exception.
Thanks!
- Jon