From af726652df9a062a906a46372b290454f84070f8 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Sun, 29 May 2016 21:28:15 +0100 Subject: [PATCH] Bug 493634: better error handling on setup/teardownEngine() Note that subclasses have been changed to throws ScriptEngineException even though the current implementation may not actually throw it. --- .../eclipse/ease/lang/ruby/jruby/JRubyScriptEngine.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/org.eclipse.ease.lang.ruby.jruby/src/org/eclipse/ease/lang/ruby/jruby/JRubyScriptEngine.java b/plugins/org.eclipse.ease.lang.ruby.jruby/src/org/eclipse/ease/lang/ruby/jruby/JRubyScriptEngine.java index 768c119e..6c2e3d87 100644 --- a/plugins/org.eclipse.ease.lang.ruby.jruby/src/org/eclipse/ease/lang/ruby/jruby/JRubyScriptEngine.java +++ b/plugins/org.eclipse.ease.lang.ruby.jruby/src/org/eclipse/ease/lang/ruby/jruby/JRubyScriptEngine.java @@ -15,6 +15,7 @@ import org.eclipse.ease.AbstractScriptEngine; import org.eclipse.ease.Script; +import org.eclipse.ease.ScriptEngineException; import org.eclipse.ease.lang.ruby.RubyHelper; import org.jruby.embed.LocalVariableBehavior; import org.jruby.embed.ScriptingContainer; @@ -38,19 +39,16 @@ public void terminateCurrent() { } @Override - protected boolean setupEngine() { + protected void setupEngine() throws ScriptEngineException { fEngine = new ScriptingContainer(LocalVariableBehavior.PERSISTENT); fEngine.setOutput(getOutputStream()); fEngine.setError(getErrorStream()); fEngine.setInput(getInputStream()); - - return true; } @Override - protected boolean teardownEngine() { - return true; + protected void teardownEngine() throws ScriptEngineException { } @Override