From fe2eab517b2e71c97fec9c76c5afab948fc5a2a8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 23 May 2019 16:27:39 +0800 Subject: [PATCH] =?UTF-8?q?post=E4=B8=AD=E9=97=B4=E5=B1=82=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ade22d4e..fbad5606 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1187,7 +1187,9 @@ module ApplicationHelper end res rescue Exception => e - Rails.logger.error("post failed! #{e}") + Rails.logger.error("post failed! #{e.message}") + # 增加错误栈信息 + e.backtrace.each { |msg| Rails.logger.error(msg) } raise("实训云平台繁忙(繁忙等级:#{status})") end end @@ -1198,7 +1200,7 @@ module ApplicationHelper res = Net::HTTP.get_response(uri).body res = JSON.parse(res) rescue => e - logger.error("get response failed ! #{e}") + logger.error("get response failed ! #{e.message}") raise("实训云平台繁忙(繁忙等级:84)") end end