Skip to content

Commit c959e8a

Browse files
OAarneRedande
authored andcommitted
Improve login error msgs WIP
1 parent cadab2e commit c959e8a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tmc-plugin/src/fi/helsinki/cs/tmc/actions/CheckForNewExercisesOrUpdates.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void run() {
8686

8787
if (currentCourseBeforeUpdate == null) {
8888
if (!beQuiet) {
89-
dialogs.displayMessage("Please select a course in TMC -> Settings.");
89+
dialogs.displayMessage("Please make sure you're logged in and have selected a course in TMC -> Settings.");
9090
}
9191
return;
9292
}

tmc-plugin/src/fi/helsinki/cs/tmc/utilities/LoginManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import fi.helsinki.cs.tmc.core.holders.TmcSettingsHolder;
1010
import fi.helsinki.cs.tmc.coreimpl.TmcCoreSettingsImpl;
1111
import fi.helsinki.cs.tmc.model.CourseDb;
12+
import fi.helsinki.cs.tmc.ui.ConvenientDialogDisplayer;
1213
import fi.helsinki.cs.tmc.ui.CourseListWindow;
1314
import fi.helsinki.cs.tmc.ui.LoginDialog;
1415
import fi.helsinki.cs.tmc.ui.OrganizationListWindow;
@@ -51,6 +52,7 @@ public void actionPerformed(ActionEvent e) {
5152
log.log(Level.WARNING, "Authentication failed!", ex);
5253
if (ex instanceof AuthenticationFailedException) {
5354
authenticationException = (AuthenticationFailedException) ex;
55+
// ConvenientDialogDisplayer.getDefault().displayError("Username or password is incorrect.", ex);
5456
}
5557
}
5658
setReady(true);
@@ -63,7 +65,7 @@ public void actionPerformed(ActionEvent e) {
6365
}
6466

6567
if (authenticationException != null) {
66-
// throw authenticationException;
68+
throw authenticationException;
6769
}
6870
showOrganizations();
6971
}

0 commit comments

Comments
 (0)