The way my controllers work is they set up as little as possible and
then call the view.  It is up to the view to query the database, etc.
In my particular application, there are remote queries that can fail
which produces an exception which I have put a rescue_from handler
for.  But since the exception happens in a view, it is wrapped by an
ActionView::TemplateError so the rescue_with_handler does not find my
exception handler.

I just submitted a patch to a ticket I opened a month ago about this.
The ticket is #2034.

I would argue that wrapping the exception in the first place is ill
advised.  I can understand wrapping it if it is a compile time error
but not if it is an execution time error.  But in any case, it seems
logical that exceptions during views should be able to be handled just
as exceptions during the controller processing.

Please review the changes and let me know your thoughts.

Thank you,
pedz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to