Module | Cms::ErrorHandling |
In: |
app/controllers/cms/error_handling.rb
|
# File app/controllers/cms/error_handling.rb, line 3 3: def self.included(controller) 4: controller.class_eval do 5: rescue_from Exception, :with => :handle_server_error 6: end 7: end
# File app/controllers/cms/error_handling.rb, line 9 9: def handle_server_error(exception) 10: logger.error "Handling Exception: #{exception}" 11: render :layout => 'cms/application', 12: :template => 'cms/shared/error', 13: :status => :internal_server_error, 14: :locals => {:exception => exception} 15: end