Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 8909732

Browse files
author
mikkomaa
authored
Merge pull request #358 from tmc-cli/fix-runtests-error-msg-juha
Fix wrong error message
2 parents e2e6be9 + 8b93afe commit 8909732

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/main/java/fi/helsinki/cs/tmc/cli/command/SubmitCommand.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ public void run(CommandLine args, Io io) {
108108
SubmissionResult result = TmcUtil.submitExercise(ctx, exercise);
109109
if (result == null) {
110110
io.println("Submission failed.");
111-
resultPrinter.addFailedExercise();
112-
continue;
111+
if (!isOnlyExercise) {
112+
io.println("Try to submit exercises one by one.");
113+
}
114+
return;
115+
//resultPrinter.addFailedExercise();
116+
//continue;
113117
}
114118

115119
resultPrinter.printSubmissionResult(result, isOnlyExercise);

src/main/java/fi/helsinki/cs/tmc/cli/tmcstuff/TmcUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ protected static void handleTmcExceptions(CliContext ctx, Exception exception) {
205205
io.println("Your tmc-cli is outdated. Please update it.");
206206
return;
207207
}
208-
io.println("Failed to connect to server.");
208+
logger.error("Command failed in tmc-core", exception);
209+
io.println("Command failed in tmc-core, check tmc-cli.log file for more info");
209210
}
210211

211212
private static boolean isAuthenticationError(Exception exception) {

0 commit comments

Comments
 (0)