diff --git a/app/controllers/concerns/controller_rescue_handler.rb b/app/controllers/concerns/controller_rescue_handler.rb index 83865e967..2cb682e5a 100644 --- a/app/controllers/concerns/controller_rescue_handler.rb +++ b/app/controllers/concerns/controller_rescue_handler.rb @@ -2,10 +2,10 @@ module ControllerRescueHandler extend ActiveSupport::Concern included do - rescue_from Exception do |e| - Util.logger_error e - render json: {status: -1, message: "接口异常"} - end + # rescue_from Exception do |e| + # Util.logger_error e + # render json: {status: -1, message: "接口异常"} + # end rescue_from Mysql2::Error do |e| Util.logger_error e render json: {status: -1, message: "接口数据异常"} @@ -24,9 +24,9 @@ module ControllerRescueHandler rescue_from ActiveRecord::RecordInvalid do |ex| render_error(ex.record.errors.full_messages.join(',')) end - rescue_from RuntimeError do |ex| - Util.logger_error "#######ex:#{ex}" - render_error(ex.message) - end + # rescue_from RuntimeError do |ex| + # Util.logger_error "#######ex:#{ex}" + # render_error(ex.message) + # end end end \ No newline at end of file