Fritz Anderson wrote:
> I'm still working on recovering from a Mysql::Error (MySQL server has 
> gone away: SELECT...). I constructed a function to wrap around Active 
> Record finds, which would rescue Mysql::Error, log the event, and 
> attempt to reconnect after a pause.
> 
> The rescue does not trap the exception. Can anyone help me figure out 
> why? The code sample below shows what's on the call stack.

Further question: The full exception message (less the stack trace) is

==
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in
 
`log': Mysql::Error: MySQL server has gone away: SELECT * FROM 
`messages` WHERE (`messages`.`disposition` IS NULL)  ORDER BY senttime 
(ActiveRecord::StatementInvalid)
==

Note the "ActiveRecord::StatementInvalid." Is that the exception I 
should have been rescuing?

    — F

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to