You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by at...@apache.org on 2013/12/13 02:03:40 UTC

svn commit: r1550606 - /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/env/SimpleErrorReporter.java

Author: ate
Date: Fri Dec 13 01:03:40 2013
New Revision: 1550606

URL: http://svn.apache.org/r1550606
Log:
SCXML-184: Allow subclasses of SimpleErrorReporter to override the current and only logging handling

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=1550606&r1=1550605&r2=1550606&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 Fri Dec 13 01:03:40 2013
@@ -106,10 +106,19 @@ public class SimpleErrorReporter impleme
                 msg.append("Expression error inside " + LogUtils.getTTPath(parent));
             }
         }
+        handleErrorMessage(errorCode, errDetail, errCtx, msg);
+    }
+
+    /**
+     * Final handling of the resulting errorMessage build by {@link #onError(String, String, Object)} onError}.
+     * <p>The default implementation write the errorMessage as a warning to the log.</p>
+     */
+    protected void handleErrorMessage(final String errorCode, final String errDetail,
+                               final Object errCtx, final CharSequence errorMessage) {
+
         if (log.isWarnEnabled()) {
-            log.warn(msg.toString());
+            log.warn(errorMessage.toString());
         }
     }
-
 }