Where can I register a handler in Rails 3 that can catch view errors? There is a class of error that Rails raises that we wish to handle and silence instead of logging as FATAL.
(These are not errors in our code, rather errors caused by the client closing the connection before the page has finished rendering, and Rails/unicorn attempting to write to a broken pipe.)
Will
rescue_fromwork for you? http://api.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.htmlYou can conceivably rescue (and silence) your particular subclass of
ActionView::TemplateError