版本库异常的测试

dev_hs
SylorHuang 6 years ago
parent e538d64f9a
commit cac35d0c74

@ -29,7 +29,6 @@ module GitCommon
def file_content def file_content
@content = git_fle_content @repo_path, @path @content = git_fle_content @repo_path, @path
Rails.logger.info("##############_____@content.present?___________########################{@content.present?}")
end end
# 版本库提交记录 # 版本库提交记录

@ -34,7 +34,8 @@ module GitHelper
rescue Exception => e rescue Exception => e
Rails.logger.error(e.message) Rails.logger.error(e.message)
raise Educoder::TipException.new("文档内容获取异常") normal_status(-1,"文档内容获取异常")
# raise Educoder::TipException.new("文档内容获取异常")
end end
end end

@ -32,6 +32,7 @@ json.shixun_detail do
if game.try(:lastest_code).blank? if game.try(:lastest_code).blank?
cha_path = challenge_path(shixun_challenge.challenge&.path) cha_path = challenge_path(shixun_challenge.challenge&.path)
latest_code = git_fle_content(game.myshixun.repo_path,cha_path) latest_code = git_fle_content(game.myshixun.repo_path,cha_path)
Rails.logger.info("#######_______latest_code______##########################{latest_code}")
else else
latest_code = game.try(:lastest_code) latest_code = game.try(:lastest_code)
end end

Loading…
Cancel
Save