catch all fatal errors in rails
is there a way to catch all fatal errors on rails - in the controllers or in the view.
So far i tried to do this on application controller:
before_filter :catch_all_errors
def catch_all_errors
开发者_运维知识库 rescue Exception
logger.info "Catch exception"
end
And it doesn't work, the fatal errors generated by rails still ends up on the log file.
Thanks.
I have always used the exception_logger plugin. You will get a small page with all logged exceptions. This is super useful when your site goes online, but you want to know about problems with your app.
精彩评论