commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SCXML-177) Correct error/warning messages in SCXML reading to be up-to-date
Date Wed, 04 Dec 2013 02:28:39 GMT

    [ https://issues.apache.org/jira/browse/SCXML-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838517#comment-13838517
] 

Ate Douma commented on SCXML-177:
---------------------------------

Hi Woonsan,

I looked into the JexlEngine silent mode and it does make a difference with regards to behavior.


If (silent==false) (the default) it will throw a JexlException, which then is re-thrown by
the (SCXML) JexlEvaluator as SCXMLExpressionException, which is good.
If (silent==true) Jexl will only log a WARN message and return null (within its invocation
context).
So IMO sticking to the default silent==false for the JexlEngine should be fine, probably without
need to also configure/override this through the SCXMLReader.

The (strict==true) setting for JexlEngine should IMO also be preferred, as default, but has
a most important caveat or consequence that  undefined/null variables result in an exception.
This will thus require somewhat more verbose scripting, e.g. like requiring '!empty(foo) and
foo.booleanMethod' instead of more lenient 'foo and foo.booleanMethod'.
Nonetheless, I'd prefer using (strict==true) for both the JexlEngine and SCXMLReader as default,
and providing SCXMLReader.setLenient(boolean) method to override this.

> Correct error/warning messages in SCXML reading to be up-to-date
> ----------------------------------------------------------------
>
>                 Key: SCXML-177
>                 URL: https://issues.apache.org/jira/browse/SCXML-177
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>            Priority: Trivial
>             Fix For: 2.0
>
>
> Some error/warning logs are outdated against the newest spec.
> For example,
> org.apache.commons.scxml2.model.ModelException: No SCXML child state with ID "null" found;
illegal initialstate for SCXML document
> 	at org.apache.commons.scxml2.io.ModelUpdater.logAndThrowModelError(ModelUpdater.java:297)
> It should inform of 'initial', not 'initialstate' and check if it is not set.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message