I have inherited a project where the previous developers added this to the application controller:
rescue_from Exception, :with => :render_500
I presume that it was to catch this and render a dynamic page. Static pages were not acceptable, but I am unsure now as to why that is. In any case, this is messing up my ability to capture exceptions with Exceptional. Is there any way to re-raise the exception after the dynamic error page has been rendered?
I tried this:
def rescue_from(exception)
respond_to |format|
format.html { #render the page# }
end
raise exception
end
However, that, quite obviously, does not work. Any ideas?
You could manually post to exceptional — rather than try to re-raise and get Exceptional to catch and post.