340 Chapter 11: Searching and browsing Figure 11.4 Ferret throws an exception when given an invalid search string. @invalid = true end end end Here we tell rescue to catch the specific exception raised by Ferret parsing errors, and then set the @invalid instance variable so that we can put an appropriate message in the view (Figure 11.5): Listing 11.13 app/views/community/search. rhtml

Gadhafi to French President Nicolas Sarkozy and British Prime Minister David Cameron and U.N. Secretary General Ban Ki-moon in which he called "invalid" the United Nations resolution passed last week authorizing the use of force against the regime in order to halt its slaughter of rebels and opposition figures.