24
24
* Refreshes the course list in the background.
25
25
*/
26
26
public final class RefreshCoursesAction {
27
-
28
27
private final static Logger log = Logger .getLogger (RefreshCoursesAction .class .getName ());
29
-
30
28
private ServerAccess serverAccess ;
31
29
private CourseDb courseDb ;
32
30
private ConvenientDialogDisplayer dialogs ;
@@ -35,6 +33,8 @@ public final class RefreshCoursesAction {
35
33
36
34
private final TmcCore tmcCore ;
37
35
private final NbTmcSettings tmcSettings ;
36
+
37
+ private static final Logger logger = Logger .getLogger (RefreshCoursesAction .class .getName ());
38
38
39
39
public RefreshCoursesAction () {
40
40
this (NbTmcSettings .getDefault ());
@@ -57,7 +57,6 @@ public RefreshCoursesAction(NbTmcSettings settings, TmcCore core) {
57
57
this .courseDb = CourseDb .getInstance ();
58
58
this .dialogs = ConvenientDialogDisplayer .getDefault ();
59
59
this .listeners = new BgTaskListenerList <List <Course >>();
60
-
61
60
this .tmcCore = core ;
62
61
}
63
62
@@ -180,8 +179,9 @@ public void bgTaskCancelled() {
180
179
@ Override
181
180
public void bgTaskFailed (Throwable ex ) {
182
181
if (showDialogOnError ) {
183
- dialogs .displayError ("Course refresh failed.\n " + ServerErrorHelper .getServerExceptionMsg (ex ));
182
+ logger .log (Level .INFO , "Course refresh failed: " , ex );
183
+ dialogs .displayError ("Course refresh failed. Check your server address and credentials\n " );
184
184
}
185
185
}
186
186
}
187
- }
187
+ }
0 commit comments