]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Don't report ResourceNotFoundExceptions when looking for browse context 85/1485/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 20 Feb 2018 15:02:09 +0000 (17:02 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 20 Feb 2018 15:03:23 +0000 (17:03 +0200)
This changes the code to behave like it did before commit 1dfeb7d5 as
intended.

refs #7719

Change-Id: I4fa9ae5114713d4e61acd1363a5369d16e1a5043

bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/Evaluators.java

index e86cdc54703559214895694478c386a6cf80e9f3..da872193fab6b538dc6e06183a371bde75c121b5 100644 (file)
@@ -296,8 +296,10 @@ public class Evaluators {
                     for(String browseContext : browseContexts) {
                         try {
                             browseContextResources.add(graph.getResource(browseContext));
                     for(String browseContext : browseContexts) {
                         try {
                             browseContextResources.add(graph.getResource(browseContext));
+                        } catch(ResourceNotFoundException e) {
+                            // Expected result, if the browse context is not modelled.
                         } catch(DatabaseException e) {
                         } catch(DatabaseException e) {
-                            LOGGER.error("Didn't find " + browseContext + " while loading model browser.", e);
+                            LOGGER.error("Unexpected error occurred while finding browse context " + browseContext + ".", e);
                         }
                     }
 
                         }
                     }