mirror of
https://github.com/criyle/go-judge.git
synced 2025-11-04 14:50:02 +08:00
display error message for compile failing
This commit is contained in:
parent
2fd7199f20
commit
10ba885724
@ -210,6 +210,16 @@ loop:
|
|||||||
// If compile read compiled files
|
// If compile read compiled files
|
||||||
var exec []file.File
|
var exec []file.File
|
||||||
if task.Type == "compile" {
|
if task.Type == "compile" {
|
||||||
|
if rt.ExitStatus != 0 {
|
||||||
|
return &types.RunTaskResult{
|
||||||
|
Status: "RE",
|
||||||
|
Time: cpuUsage / uint64(time.Millisecond),
|
||||||
|
Memory: memoryUsage >> 10,
|
||||||
|
Input: inputContent,
|
||||||
|
UserOutput: outputPipe.Buffer.Bytes(),
|
||||||
|
UserError: errorPipe.Buffer.Bytes(),
|
||||||
|
}
|
||||||
|
}
|
||||||
for _, fn := range param.CompiledFileNames {
|
for _, fn := range param.CompiledFileNames {
|
||||||
f, err := m.Open(fn)
|
f, err := m.Open(fn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user