[jira] [Commented] (SCXML-179) Leave more context (location) information when failing to execute JEXL scripts
[ https://issues.apache.org/jira/browse/SCXML-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13837505#comment-13837505 ] Ate Douma commented on SCXML-179: - Hi Woonsan, nice improvement. However I'm still puzzled by the Jexl error location (161![14,22]) which seems weird, as those line numbers(161 AND 14?) don't add up or match with the source. This is probably more of an Jexl issue I guess, but it would be nice if somehow this could be improved as well, ideally of course with exact line/column info within the SCXML source document. I'm not saying this should be fixed or further improved right now, but maybe something to look into at a later time? Leave more context (location) information when failing to execute JEXL scripts -- Key: SCXML-179 URL: https://issues.apache.org/jira/browse/SCXML-179 Project: Commons SCXML Issue Type: Improvement Reporter: Woonsan Ko Assignee: Woonsan Ko Priority: Minor Fix For: 2.0 Currently, it doesn't give enough context (location) information in warning logs when there are script errors (e.g, undefined object usages) like the following: EXPRESSION_ERROR (evalScript(' unknownObject.invoke(); '):org.apache.commons.scxml2.env.jexl.JexlEvaluator.evalScript@161![14,22]: 'unknownObject.invoke();' attempting to call method on null): The line number above (161) is from JexlEvaluator, not from SCXML source. It would be better if it gave more information somehow about the SCXML location and element location, for instance. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (SCXML-179) Leave more context (location) information when failing to execute JEXL scripts
[ https://issues.apache.org/jira/browse/SCXML-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13837791#comment-13837791 ] Woonsan Ko commented on SCXML-179: -- Hi Ate, The reason why JEXL prints out the debugging info like 'org.apache.commons.scxml2.env.jexl.JexlEvaluator.evalScript@161![14,22]' is that SCXML JexlEvaluator doesn't give a source location information to the JexlEngine for itself and so JEXL engine just tries to make a debugging information by itself (by finding the caller class (JexlEvaluator in this case) and its line number (161) as well as more debugging purpose parsed JEXL node information ([14,22])). In order to give a precise source location information of SCXML, we have to provide that kind of information in commons-scxml when invoking JEXL Engine. For example, JexlEvaluator#evalScript() invokes getJexlEngine().createScript(script) currently. If we want to give source location info, then we'd better change it to getJexlEngine().createScript(script, JexlInfo, null), where JexlInfo contains the debugging information. However, the current SCXML model objects do not have source location information at all unfortunately. It can be a good improvement to add that kind of information in SCXML model objects in the future. Therefore, I wanted to stop there with the state path information for now. I'll create a separate issue for it. Regards, Woonsan Leave more context (location) information when failing to execute JEXL scripts -- Key: SCXML-179 URL: https://issues.apache.org/jira/browse/SCXML-179 Project: Commons SCXML Issue Type: Improvement Reporter: Woonsan Ko Assignee: Woonsan Ko Priority: Minor Fix For: 2.0 Currently, it doesn't give enough context (location) information in warning logs when there are script errors (e.g, undefined object usages) like the following: EXPRESSION_ERROR (evalScript(' unknownObject.invoke(); '):org.apache.commons.scxml2.env.jexl.JexlEvaluator.evalScript@161![14,22]: 'unknownObject.invoke();' attempting to call method on null): The line number above (161) is from JexlEvaluator, not from SCXML source. It would be better if it gave more information somehow about the SCXML location and element location, for instance. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (SCXML-179) Leave more context (location) information when failing to execute JEXL scripts
[ https://issues.apache.org/jira/browse/SCXML-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13837798#comment-13837798 ] Ate Douma commented on SCXML-179: - Sounds good Woonsan, thanks! Leave more context (location) information when failing to execute JEXL scripts -- Key: SCXML-179 URL: https://issues.apache.org/jira/browse/SCXML-179 Project: Commons SCXML Issue Type: Improvement Reporter: Woonsan Ko Assignee: Woonsan Ko Priority: Minor Fix For: 2.0 Currently, it doesn't give enough context (location) information in warning logs when there are script errors (e.g, undefined object usages) like the following: EXPRESSION_ERROR (evalScript(' unknownObject.invoke(); '):org.apache.commons.scxml2.env.jexl.JexlEvaluator.evalScript@161![14,22]: 'unknownObject.invoke();' attempting to call method on null): The line number above (161) is from JexlEvaluator, not from SCXML source. It would be better if it gave more information somehow about the SCXML location and element location, for instance. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (SCXML-179) Leave more context (location) information when failing to execute JEXL scripts
[ https://issues.apache.org/jira/browse/SCXML-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13837285#comment-13837285 ] Woonsan Ko commented on SCXML-179: -- Improved SimpleErrorReporter.java. Now it leaves the location of the expression in SCXML like the following: EXPRESSION_ERROR (evalScript(' unknownObject.invoke(); '):org.apache.commons.scxml2.env.jexl.JexlEvaluator.evalScript@161![14,22]: 'unknownObject.invoke();' attempting to call method on null): Expression error inside /hello/world It appends the transition target path information (e.g, 'inside /hello/world') now. Leave more context (location) information when failing to execute JEXL scripts -- Key: SCXML-179 URL: https://issues.apache.org/jira/browse/SCXML-179 Project: Commons SCXML Issue Type: Improvement Reporter: Woonsan Ko Assignee: Woonsan Ko Priority: Minor Fix For: 2.0 Currently, it doesn't give enough context (location) information in warning logs when there are script errors (e.g, undefined object usages) like the following: EXPRESSION_ERROR (evalScript(' unknownObject.invoke(); '):org.apache.commons.scxml2.env.jexl.JexlEvaluator.evalScript@161![14,22]: 'unknownObject.invoke();' attempting to call method on null): The line number above (161) is from JexlEvaluator, not from SCXML source. It would be better if it gave more information somehow about the SCXML location and element location, for instance. -- This message was sent by Atlassian JIRA (v6.1#6144)