ref #6763 Catch potential exception
authorPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 24 Nov 2017 07:41:25 +0000 (08:41 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 24 Nov 2017 07:41:25 +0000 (08:41 +0100)
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/LifeCycleManager.java

index 76ae61b951ba0d540332acb41bd0a2e27484bff4..8b8f12aafc958d81a64f0581568d20a12a411176 100644 (file)
@@ -79,9 +79,14 @@ public class LifeCycleManager implements IContextListener{
             MApplication application) {
         IEclipseContext context = application.getContext();
         EPartService partService = context.get(EPartService.class);
-        Collection<MPart> dirtyParts = partService.getDirtyParts();
-        if(!dirtyParts.isEmpty()){
-            partService.saveAll(true);
+        try {
+            Collection<MPart> dirtyParts = partService.getDirtyParts();
+            if(!dirtyParts.isEmpty()){
+                partService.saveAll(true);
+            }
+        } catch (IllegalStateException e) {
+            //FIXME E4
+            //exception is ignored as this is a temporary fix until full e4 migration
         }
     }