mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
编译错误的时候显示错误详情
This commit is contained in:
parent
6963b2879b
commit
046867eb6c
@ -23,13 +23,16 @@ def compile_(language_item, src_path, exe_path, judge_base_path):
|
||||
use_sandbox=False)
|
||||
|
||||
compile_output_handler = open(compiler_output_file)
|
||||
compile_output = compile_output_handler.read()
|
||||
compile_output = compile_output_handler.read().strip()
|
||||
compile_output_handler.close()
|
||||
|
||||
if compile_result["flag"] != 0:
|
||||
logger.error("Compiler error")
|
||||
logger.error(compile_output)
|
||||
logger.error(str(compile_result))
|
||||
if compile_output:
|
||||
raise CompileError(compile_output)
|
||||
else:
|
||||
raise CompileError("Compile error, info: " + str(compile_result))
|
||||
else:
|
||||
if "error" in compile_output:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user