jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1695709 - /jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
Date Thu, 13 Aug 2015 13:40:52 GMT
Author: sebb
Date: Thu Aug 13 13:40:52 2015
New Revision: 1695709

URL: http://svn.apache.org/r1695709
Log:
More informative warning if an error occurs

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1695709&r1=1695708&r2=1695709&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Thu Aug 13 13:40:52 2015
@@ -793,7 +793,7 @@ public class JMeterUtils implements Unit
         try {
             ans = Integer.parseInt(appProperties.getProperty(propName, Integer.toString(defaultVal)).trim());
         } catch (Exception e) {
-            log.warn("Unexpected value set for int property:'"+propName+"', defaulting to:"+defaultVal);
+            log.warn("Exception '"+ e.getMessage()+ "' occurred when fetching int property:'"+propName+"',
defaulting to:"+defaultVal);
             ans = defaultVal;
         }
         return ans;
@@ -820,7 +820,7 @@ public class JMeterUtils implements Unit
                 ans = Integer.parseInt(strVal) == 1;
             }
         } catch (Exception e) {
-            log.warn("Unexpected value set for boolean property:'"+propName+"', defaulting
to:"+defaultVal);
+            log.warn("Exception '"+ e.getMessage()+ "' occurred when fetching boolean property:'"+propName+"',
defaulting to:"+defaultVal);
             ans = defaultVal;
         }
         return ans;
@@ -840,7 +840,7 @@ public class JMeterUtils implements Unit
         try {
             ans = Long.parseLong(appProperties.getProperty(propName, Long.toString(defaultVal)).trim());
         } catch (Exception e) {
-            log.warn("Unexpected value set for long property:'"+propName+"', defaulting to:"+defaultVal);
+            log.warn("Exception '"+ e.getMessage()+ "' occurred when fetching long property:'"+propName+"',
defaulting to:"+defaultVal);
             ans = defaultVal;
         }
         return ans;
@@ -864,7 +864,7 @@ public class JMeterUtils implements Unit
                 ans = value.trim();
             }
         } catch (Exception e) {
-            // TODO Can this happen ?
+            log.warn("Exception '"+ e.getMessage()+ "' occurred when fetching String property:'"+propName+"',
defaulting to:"+defaultVal);
             ans = defaultVal;
         }
         return ans;
@@ -882,7 +882,7 @@ public class JMeterUtils implements Unit
         try {
             ans = appProperties.getProperty(propName);
         } catch (Exception e) {
-            // TODO Can this happen ?
+            log.warn("Exception '"+ e.getMessage()+ "' occurred when fetching String property:'"+propName+"'");
             ans = null;
         }
         return ans;



Mime
View raw message