Skip to content

Commit dddd34b

Browse files
committed
Corrected error messages
1 parent 7c389bf commit dddd34b

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

lib/error_codes.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
- Code 1: See judger.c line 23: The String programmingLanguage is either null or it has a value the if conditions can't handle
2-
- Code -1: See judger.c line 56-60: The file had a value of NULL
3-
- Code 2: See judger.c line 84: The compiler exited with an error code
4-
- Code -2: See judger.c line 81: The compiler isn't installed or it wasn't found
5-
- Code 3: See judger.c line 81: The function system() is damaged
6-
- Code -3: See judger.c line 144 and 164: The programm crashed
7-
8-
// TODO Force User to write public class Main if he uses Java
9-
// TODO Correct this file
1+
- Code 1: The String programmingLanguage is either null or it has a value the if conditions can't handle,
2+
which means it's an unsupported language (judger.c line 208)
3+
- Code -1: The file has a value of NULL (judger.c line 227-231)
4+
- Code 2: The compiler exited with an error code, which means the users code has a mistake (judger.c line 260)
5+
- Code -2: The compiler isn't installed or it wasn't found (judger.c line 257)
6+
- Code 3: The function system() is damaged (judger.c line 251)
7+
- Code -3: The programm crashed, which means the users code has a mistake (judger.c line 278 & 297)

native/judger.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ char* runProgramAndCalculateTheScore(char* correctSolution, char* instruction) {
294294

295295
// Check whether the programm crashed by checking the exit codes
296296
if (WIFSIGNALED(status)) {
297+
printf("ERROR: The programm crashed (Code -3)\n");
297298
crashed = TRUE;
298299
} else {
299300
// If everything is fine return the correct Output

0 commit comments

Comments
 (0)