Revision ab79a3ac
Added by Katja Luther over 3 years ago
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java | ||
---|---|---|
12 | 12 |
import org.springframework.remoting.RemoteAccessException; |
13 | 13 |
import org.springframework.remoting.RemoteConnectFailureException; |
14 | 14 |
|
15 |
import eu.etaxonomy.cdm.database.PermissionDeniedException; |
|
15 | 16 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
16 | 17 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
17 | 18 |
import eu.etaxonomy.taxeditor.store.CdmAuthenticationException; |
... | ... | |
87 | 88 |
return; |
88 | 89 |
} |
89 | 90 |
previousT = t; |
91 |
if (t != null && (t.getCause() != null && t.getCause() instanceof PermissionDeniedException)){ |
|
92 |
MessagingUtils.informationDialog("Permission denied", MessagingUtils.PERMISSION_DENIED); |
|
90 | 93 |
|
91 |
if (t != null && ( t instanceof NoHttpResponseException || (t.getCause() != null && t.getCause() instanceof CdmAuthenticationException) || (t.getMessage() != null && t.getMessage().contains("status code = 403")))){ |
|
94 |
} |
|
95 |
else if (t != null && ( t instanceof NoHttpResponseException || (t.getCause() != null && t.getCause() instanceof CdmAuthenticationException) || (t.getMessage() != null && t.getMessage().contains("status code = 403")))){ |
|
92 | 96 |
MessagingUtils.informationDialog("Access denied", MessagingUtils.ACCESS_DENIED); |
93 | 97 |
|
94 | 98 |
}else |
... | ... | |
122 | 126 |
true); |
123 | 127 |
|
124 | 128 |
} |
129 |
}else if (t != null && t.getStackTrace().toString().contains("java.io.OptionalDataException")){ |
|
130 |
MessagingUtils.warn(this.getClass(), MessagingUtils.RESTART_EDITOR_MESSAGE); |
|
131 |
|
|
125 | 132 |
} |
126 | 133 |
} |
127 | 134 |
} |
Also available in: Unified diff
ref #9629: handle OptionalDataException