File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/java/org/scijava/plugins/scripting/jython Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 4343import org .python .core .PyObject ;
4444import org .python .core .PyString ;
4545import org .python .util .PythonInterpreter ;
46+ import org .scijava .log .LogService ;
4647import org .scijava .plugin .Parameter ;
4748import org .scijava .plugin .Plugin ;
4849import org .scijava .script .AdaptedScriptLanguage ;
@@ -71,6 +72,9 @@ public class JythonScriptLanguage extends AdaptedScriptLanguage {
7172 @ Parameter
7273 private ThreadService threadService ;
7374
75+ @ Parameter
76+ private LogService logService ;
77+
7478 public JythonScriptLanguage () {
7579 super ("jython" );
7680 }
@@ -79,6 +83,7 @@ public JythonScriptLanguage() {
7983 public ScriptEngine getScriptEngine () {
8084 // TODO: Consider adapting the wrapped ScriptEngineFactory's ScriptEngine.
8185 final JythonScriptEngine engine = new JythonScriptEngine ();
86+ final LogService ls = logService ;
8287
8388 synchronized (phantomReferences ) {
8489 // NB: This phantom reference is used to clean up any local variables
@@ -128,6 +133,7 @@ public void run() {
128133 }
129134 catch (final Exception ex ) {
130135 // log exception, continue
136+ ls .error (ex );
131137 }
132138 }
133139 }
You can’t perform that action at this time.
0 commit comments