post中间层信息增加错误信息日志

dev_trainings
daiao 6 years ago
parent d4ad370635
commit fe2eab517b

@ -1187,7 +1187,9 @@ module ApplicationHelper
end end
res res
rescue Exception => e 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}") raise("实训云平台繁忙(繁忙等级:#{status}")
end end
end end
@ -1198,7 +1200,7 @@ module ApplicationHelper
res = Net::HTTP.get_response(uri).body res = Net::HTTP.get_response(uri).body
res = JSON.parse(res) res = JSON.parse(res)
rescue => e rescue => e
logger.error("get response failed ! #{e}") logger.error("get response failed ! #{e.message}")
raise("实训云平台繁忙繁忙等级84") raise("实训云平台繁忙繁忙等级84")
end end
end end

Loading…
Cancel
Save