why does unsuccesful find throw an exception?

Wow, you shouldn't be getting an exception, at least not with :first. The agile book specifically points this out! (First edition, anyway; page 219 sidebar for those following at home.)

Find'ing with an id SHOULD throw an exception though; are you specifying id in your conditions?

If you're finding by id, then yes, you should be handling exceptions. If you're not finding by id, then if nothing's there, you should handle that eventuality accordingly.

So say the docs: (ActiveRecord::Base)

    * Find by id: This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 6, 10]). If no record can be found for all of the listed ids, then RecordNotFound will be raised.     * Find first: This will return the first record matched by the options used. These options can either be specific conditions or merely an order. If no record can matched, nil is returned.     * Find all: This will return all the records matched by the options used. If no records are found, an empty array is returned.

Well if your code is throwing an exception then yeah, you should handle exceptions :wink:

How about a simple:

begin   @user = User.find(:first) rescue   flash[:notice] = 'Sorry, fresh out of users!'   redirect_to index_url end

That is, of course, assuming the User.find(:first) call would throw an exception if there are no users. I know it does for certain if you specify in an invalid user though...