From cb02bd38278d7db932d8aa9fc12867bc99b47907 Mon Sep 17 00:00:00 2001 From: hjust Date: Mon, 8 Feb 2010 17:57:11 +0000 Subject: [PATCH] reenable safety net for report exceptions git-svn-id: https://dev.finn.de/svn/cockpit/trunk@504 7926756e-e54e-46e6-9721-ed318f58905e --- app/controllers/cost_reports_controller.rb | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/controllers/cost_reports_controller.rb b/app/controllers/cost_reports_controller.rb index c50083295a..4fe945c00a 100644 --- a/app/controllers/cost_reports_controller.rb +++ b/app/controllers/cost_reports_controller.rb @@ -49,23 +49,23 @@ class CostReportsController < ApplicationController else render :layout => !request.xhr? end - # rescue Exception => e - # logger.error "#{e.class.name}: #{e.message}" if logger - # session.delete :cost_query - # - # # Give it a name, required to be valid - # @query = CostQuery.new(:name => "_") - # @query.project = @project - # - # get_entries(limit) - # respond_to do |format| - # format.html do - # @custom_error = l(:error_generic) - # render :layout => !request.xhr? - # end - # format.atom {render_500(l(:error_generic))} - # format.csv {render_500(l(:error_generic))} - # end + rescue Exception => e + logger.error "#{e.class.name}: #{e.message}" if logger + session.delete :cost_query + + # Give it a name, required to be valid + @query = CostQuery.new(:name => "_") + @query.project = @project + + get_entries(limit) + respond_to do |format| + format.html do + @custom_error = l(:error_generic) + render :layout => !request.xhr? + end + format.atom {render_500(l(:error_generic))} + format.csv {render_500(l(:error_generic))} + end end def new