Jens Kraemer wrote:
> On Wed, Nov 22, 2006 at 12:13:49AM +0100, Matthew Planchant wrote:
>> > def primary_organisation_name
>> > primary_organisation.name rescue nil
>> > end
>>
>> Ok. Thanks. What does this do?
>
> it returns nil in case the expression before the 'rescue' raises an
> exception.
Ah I see. Thanks for the explanation.
Is there a way of catching the exception here:
def organisation_names
organisations.collect { |organisation| organisation.name }.join ' '
end
I take it you have no experience of the rebuild ending prematurely?
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk