调用编辑接口不成功时,打印具体的信息

dev_pull
guange 9 years ago
parent c7bb53d2bd
commit 8df0dcae7a

@ -110,9 +110,9 @@ class StudentWorkController < ApplicationController
#status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时
resultObj[:status] = -3
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id)
rescue
rescue => e
#-4 judge代码 出错
logger.debug "program_test_error 1"
logger.debug "program_test_error #{e}"
resultObj[:status] = -4
tmpstatus = -4
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id)

Loading…
Cancel
Save