improve messaging
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / name / operation / DeleteSynonymOperation.java
index 7ac2fd7de10e7f1bdb47a9a850a355d09800485f..fdef1cd3544a759252bfb21cf303ba7494794b3b 100644 (file)
@@ -81,9 +81,9 @@ public class DeleteSynonymOperation extends AbstractPostTaxonOperation {
                                        
                                        DeleteResult result = service.deleteSynonym(synonym, null);
                                        if (result.isError()){
-                                               MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
-                                       } else if (result.getUpdatedObjects().size() != 0){
-                                               MessageDialog.openInformation(null, "Delete successfull", "The Synonym could be deleted, but there is an updated object: " + result.getExceptions().get(0).getMessage());
+                                               MessageDialog.openError(null, "Delete failed", result.toString());
+                                       } else if (!result.getUpdatedObjects().isEmpty()){
+                                               MessageDialog.openInformation(null, "Delete successfull", "The Synonym could be deleted, but there is an updated object: " + result.toString());
                                        }
                                }
                        //      taxon.removeSynonym(synonym);