tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject tinkerpop git commit: Had to trap an exception better in ServerGremlinExecutor during init CTR
Date Wed, 25 Jan 2017 21:40:31 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 28dffda6b -> 47e5ae2f3


Had to trap an exception better in ServerGremlinExecutor during init CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/47e5ae2f
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/47e5ae2f
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/47e5ae2f

Branch: refs/heads/tp32
Commit: 47e5ae2f319fb6eb20fa131a8136ded682b8045b
Parents: 28dffda
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Wed Jan 25 16:39:38 2017 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Wed Jan 25 16:39:38 2017 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/server/util/ServerGremlinExecutor.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/47e5ae2f/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
index 199c9f8..b9b7280 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
@@ -149,7 +149,13 @@ public class ServerGremlinExecutor<T extends ScheduledExecutorService>
{
         // the GremlinExecutor is using the GremlinScriptEngineManager. this is a bit of
hack, but it at least allows
         // the global bindings to become available after the init scripts are run (DefaultGremlinScriptEngineManager
         // runs the init scripts when the GremlinScriptEngine is created.
-        settings.scriptEngines.keySet().forEach(engineName -> gremlinExecutor.eval("1+1",
engineName, Collections.emptyMap()).join());
+        settings.scriptEngines.keySet().forEach(engineName -> {
+            try {
+                gremlinExecutor.eval("1+1", engineName, Collections.emptyMap()).join();
+            } catch (Exception ex) {
+                logger.warn(String.format("Could not initialize {} ScriptEngine as script
could not be evaluated - %s", engineName), ex);
+            }
+        });
 
         // script engine init may have altered the graph bindings or maybe even created new
ones - need to
         // re-apply those references back


Mime
View raw message