Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333231 - [Interpreter] Exception handling for script engine
Summary: [Interpreter] Exception handling for script engine
Status: RESOLVED FIXED
Alias: None
Product: EMFT.Henshin
Classification: Modeling
Component: Interpreter (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Enrico Biermann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-27 05:18 EST by Christian Krause CLA
Modified: 2011-02-24 03:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Krause CLA 2010-12-27 05:18:34 EST
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.
Comment 1 Enrico Biermann CLA 2011-01-06 07:59:20 EST
I added RuntimeExceptions to failed ScriptEngine evaluations.

As for initialization errors on the script engine itself, which systems have problems with initializing the engine?
Comment 2 Christian Krause CLA 2011-01-06 09:20:01 EST
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?
Comment 3 Enrico Biermann CLA 2011-02-24 03:48:41 EST
Already fixed