jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380567 - in /jmeter/trunk/src/core/org/apache/jmeter: engine/util/CompoundVariable.java functions/InvalidVariableException.java
Date Tue, 04 Sep 2012 11:28:04 GMT
Author: pmouawad
Date: Tue Sep  4 11:28:03 2012
New Revision: 1380567

URL: http://svn.apache.org/viewvc?rev=1380567&view=rev
Log:
Cascade exceptions
Add logging of silent exceptions

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java
    jmeter/trunk/src/core/org/apache/jmeter/functions/InvalidVariableException.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java?rev=1380567&r1=1380566&r2=1380567&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java Tue Sep  4 11:28:03
2012
@@ -105,6 +105,10 @@ public class CompoundVariable implements
         try {
             setParameters(parameters);
         } catch (InvalidVariableException e) {
+            // TODO should level be more than debug ?
+            if(log.isDebugEnabled()) {
+                log.debug("Invalid variable:"+ parameters, e);
+            }
         }
     }
 
@@ -140,6 +144,10 @@ public class CompoundVariable implements
                 try {
                     results.append(((Function) item).execute(previousResult, currentSampler));
                 } catch (InvalidVariableException e) {
+                    // TODO should level be more than debug ?
+                    if(log.isDebugEnabled()) {
+                        log.debug("Invalid variable:"+item, e);
+                    }
                 }
             } else if (item instanceof SimpleVariable) {
                 testDynamic = true;
@@ -192,7 +200,7 @@ public class CompoundVariable implements
                 return ((Class<?>) functions.get(functionName)).newInstance();
             } catch (Exception e) {
                 log.error("", e); // $NON-NLS-1$
-                throw new InvalidVariableException();
+                throw new InvalidVariableException(e);
             }
         }
         return new SimpleVariable(functionName);

Modified: jmeter/trunk/src/core/org/apache/jmeter/functions/InvalidVariableException.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/functions/InvalidVariableException.java?rev=1380567&r1=1380566&r2=1380567&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/functions/InvalidVariableException.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/functions/InvalidVariableException.java Tue Sep
 4 11:28:03 2012
@@ -24,6 +24,14 @@ public class InvalidVariableException ex
     public InvalidVariableException() {
     }
 
+    public InvalidVariableException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvalidVariableException(Throwable cause) {
+        super(cause);
+    }
+
     public InvalidVariableException(String msg) {
         super(msg);
     }



Mime
View raw message