Can I nest rescues, like one can (normally) nest if statements?

For example:

#Validates text that should exist on the page.
@browser.text.should include?("COMPANY INFORMATION")
        #Rescues text not found, by refreshing the page
        rescue Watir::Exception::NoMatchingTextFoundException
                @browser.refresh
                @browser.text.should include?("COMPANY INFORMATION")
                 rescue Watir::Exception::NoMatchingTextFoundException
                 puts "SVC failed to load the page. Exiting: Code2."
                 end
        end

Does using rescue syntax like this work, or no?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to