Community
Participate
Working Groups
Runtime errors that occur in the script engine are currently only printed to sysout. Instead thez should cause a runtime error in the interpreter. The easiest way to do this is to throw a RuntimeException which contains the causing ScriptException. Also: it can happen that on some systems the script engine cannot be initialized. Currently this causes an NPE when the interpreter is trying to use the engine for the first time. I think there should be again a RuntimeException with an error like "Error initializing script engine" or something similar. This can be either checked when the scriptengine is initialized or when it is being used for the first time. The latter has the advantage that transformations that don't require a scriptengine can still be executed.
I added RuntimeExceptions to failed ScriptEngine evaluations. As for initialization errors on the script engine itself, which systems have problems with initializing the engine?
I experienced this problem on my netbook running Gentoo. I haven't figured out yet why the engine is not found. Anyway, it can happen and if it does it is better to throw a runtime exception saying 'Error initializing script engine' than a NPE at some point during the execution. (In reply to comment #1) > I added RuntimeExceptions to failed ScriptEngine evaluations. > > As for initialization errors on the script engine itself, which systems have > problems with initializing the engine?
Already fixed