Try-Catch AWDWR P3.0, Sect9.2,Mid pg 121

On page 118, file store_controller.rb, the “redirect_to_index” is added.
At mid page 120, that line is removed. When the browser is first sent to
the “:3000/store”, the page displays properly. But when the Add to Cart
button is clicked, the browser displays the text of a try-catch block
(see below). There is no error message - the browser clearly sees text
to be displayed. If I re-introduce the redirect line again, all “seems”
to work well.
Q1: What causes the try-catch block text display? Its obviously
generated code; how would I find out what generated it?
Q2: How do I know when is the Ajax part is really working? What key
phrases should be displayed in the log file? (I’ve looked in the log
file, but I can’t tell.)

try {
Element.update(“cart”, "\074div class=“cart-title”\076Your
Cart\074/div\076\n\074table\076\n\t\n\t\074tr\076
id=“current_item”\076\n\n\t\074td\0763×\074/td\076\n\t\074td\076Pragmatic
Project Automation\074/td\076\n (see the attachment for the rest)

#1: the try and catch parts are ruby javascript or RJS. Check to see
what
code it’s using to request the page.

#2: There is no way to tell.