You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/commands/AssociateNetworkCommandTask.java
+20-12Lines changed: 20 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -35,26 +35,34 @@ public AssociateNetworkCommandTask() {
35
35
36
36
@Override
37
37
publicvoidrun(TaskMonitortm) {
38
-
if(emNetworkSUID == null)
39
-
thrownewIllegalArgumentException("emNetworkSUID is null");
40
-
if(!emManager.isEnrichmentMap(emNetworkSUID))
41
-
thrownewIllegalArgumentException("emNetworkSUID is not an EnrichmentMap network");
42
-
if(associatedNetworkSUID == null)
43
-
thrownewIllegalArgumentException("associatedNetworkSUID is null");
44
-
38
+
// AutoAnnotate may call this command on non-EM networks, so we need to fail gracefully, ie don't throw an Exception.
39
+
if(emNetworkSUID == null) {
40
+
tm.showMessage(TaskMonitor.Level.ERROR, "emNetworkSUID is null");
41
+
return;
42
+
}
43
+
if(associatedNetworkSUID == null) {
44
+
tm.showMessage(TaskMonitor.Level.ERROR, "associatedNetworkSUID is null");
45
+
return;
46
+
}
47
+
if(!emManager.isEnrichmentMap(emNetworkSUID)) {
48
+
tm.showMessage(TaskMonitor.Level.WARN, "emNetworkSUID is not an EnrichmentMap network");
0 commit comments