Issue #97 has been updated by Rapha?l Ouazana.

File patch-fine-error-message-when-rhino-fails.diff added
% Done changed from 0 to 100

Jonathan Clarke wrote:
> Looking forward to your patch :)

Here it is !

Now, with this patch you get a clear localized error message, like:
ERROR  org.lsc.utils.JScriptEvaluator.instanceEval(JScriptEvaluator.java:233)   
- org.mozilla.javascript.EcmaError: ReferenceError: "srcbean" n'est pas d?fini 
(<cmd>#1)

After that, there is two possibilities:
- the fact that the value is null is handled by LSC, so the sync continues
- null is not handled, and an other exception is thrown later

Regards,
Rapha?l.

----------------------------------------
Feature #97: Explicit error message when Rhino fails
http://tools.lsc-project.org/issues/show/97

Author: Rapha?l Ouazana
Status: Assigned
Priority: Normal
Assigned to: Rapha?l Ouazana
Category: Core
Target version: 


Hi,

When a Javascript script fails, the only error message we get is "Java Null 
Pointer Exception" or something like that.
Rhino can provide much more information simply by displaying the content of the 
ECMAError that is thrown.

I see two solutions for that:
- modify BeanComparator to catch the exception thrown by 
JScriptEvaluator.evalToStringList and JScriptEvaluator.evalToString
- modify JscriptEvaluator to catch the exceptions sent by .exec() and modify 
JScriptEvaluatorTest accordingly

I can provide a patch for one or other solution.

Regards,
Rapha?l Ouazana.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.lsc-project.org/pipermail/lsc-dev/attachments/20090818/297fdaf3/attachment.htm>

Reply via email to