Revision 073d62ba
Added by Patrick Plitzner over 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/util/DistributionEditorUtil.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.cdm.vaadin.util; |
2 | 2 |
|
3 |
import java.sql.SQLException; |
|
3 | 4 |
import java.util.Set; |
4 | 5 |
|
5 | 6 |
import com.vaadin.server.VaadinSession; |
7 |
import com.vaadin.ui.Notification; |
|
8 |
import com.vaadin.ui.Notification.Type; |
|
6 | 9 |
import com.vaadin.ui.UI; |
7 | 10 |
|
8 | 11 |
import eu.etaxonomy.cdm.model.common.TermVocabulary; |
... | ... | |
38 | 41 |
Object isAbbreviated = VaadinSession.getCurrent().getAttribute(DistributionEditorUtil.SATTR_ABBREVIATED_LABELS); |
39 | 42 |
return (isAbbreviated==null || (boolean) isAbbreviated); |
40 | 43 |
} |
44 |
|
|
45 |
public static void showSqlError(SQLException e) { |
|
46 |
Notification.show("Error while accessing data base.","Cause: "+e.getMessage(), Type.ERROR_MESSAGE); |
|
47 |
e.printStackTrace(); |
|
48 |
} |
|
41 | 49 |
|
42 | 50 |
public static final String SATTR_CONVERSATION = "conversation"; |
43 | 51 |
|
Also available in: Unified diff
ref #5458 Refactor SQLException handling