delete taxonnode if taxon is used somewhere else fixed
authorKatja Luther <k.luther@bgbm.org>
Wed, 3 Jun 2015 13:19:59 +0000 (13:19 +0000)
committerKatja Luther <k.luther@bgbm.org>
Wed, 3 Jun 2015 13:19:59 +0000 (13:19 +0000)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java

index ad739203dc88570a65804add5571edd5c4bea677..0471420414d1b0506c810a3593dbdb46c45d273a 100644 (file)
@@ -104,6 +104,13 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                if (result.isError() && !result.getExceptions().isEmpty()){
                                        //TODO:Error message!
                                        MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+                               } else if (!result.getExceptions().isEmpty()){
+                                       String separator = ", ";
+                                   String exceptionString = "";
+                                   for (Exception exception : result.getExceptions()) {
+                                   exceptionString += exception.getLocalizedMessage()+separator;
+                               }
+                                       MessageDialog.openInformation(null, "Delete of the node was successful but the taxon could not be deleted.", exceptionString);
                                }