commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1547265 - /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java
Date Tue, 03 Dec 2013 03:29:23 GMT
Author: woonsan
Date: Tue Dec  3 03:29:22 2013
New Revision: 1547265

URL: http://svn.apache.org/r1547265
Log:
SCXML-179: leave location information (parent state path) when an expression fails.

Modified:
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java?rev=1547265&r1=1547264&r2=1547265&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java
(original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java
Tue Dec  3 03:29:22 2013
@@ -24,6 +24,7 @@ import java.util.Set;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.model.Executable;
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.TransitionTarget;
@@ -99,6 +100,11 @@ public class SimpleErrorReporter impleme
                 }
                 msg.append(']');
             }
+        } else if (errCode == ErrorConstants.EXPRESSION_ERROR) {
+            if (errCtx instanceof Executable) {
+                TransitionTarget parent = ((Executable) errCtx).getParent();
+                msg.append("Expression error inside " + LogUtils.getTTPath(parent));
+            }
         }
         if (log.isWarnEnabled()) {
             log.warn(msg.toString());



Mime
View raw message