fix the error caused by the delete functionality in the service layer
authorKatja Luther <k.luther@bgbm.org>
Thu, 10 Oct 2013 07:43:56 +0000 (07:43 +0000)
committerKatja Luther <k.luther@bgbm.org>
Thu, 10 Oct 2013 07:43:56 +0000 (07:43 +0000)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeAcceptedTaxonToSynonymOperation.java

index e56cf046b5709c046e720f2a189c4f043d2aa413..42dbfec259f2147f3479e015332fbbf713ed93a3 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
@@ -67,7 +68,13 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
 
                monitor.worked(20);
                bind();
-       Synonym synonym = CdmStore.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode(oldTaxonNode, newAcceptedTaxonNode, null, null, null);
+       Synonym synonym = null;
+               try {
+                       synonym = CdmStore.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode(oldTaxonNode, newAcceptedTaxonNode, null, null, null);
+               } catch (DataChangeNoRollbackException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
                monitor.worked(40);
         
                return postExecute(synonym);