Author: sebb
Date: Wed Jan  7 10:44:49 2009
New Revision: 732428

URL: http://svn.apache.org/viewvc?rev=732428&view=rev
Log:
Better handling of errors encountered during shutdown

Modified:
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?rev=732428&r1=732427&r2=732428&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
 Wed Jan  7 10:44:49 2009
@@ -243,13 +243,17 @@
         Iterator iter = testListeners.getSearchResults().iterator();
         while (iter.hasNext()) {
             TestListener tl = (TestListener) iter.next();
-            if (tl instanceof TestBean) {
-                TestBeanHelper.prepare((TestElement) tl); // TODO is this 
necessary? It was called by start.
-            }
-            if (host == null) {
-                tl.testEnded();
-            } else {
-                tl.testEnded(host);
+            try {
+                if (tl instanceof TestBean) {
+                    TestBeanHelper.prepare((TestElement) tl); // TODO is this 
necessary? It was called by start.
+                }
+                if (host == null) {
+                    tl.testEnded();
+                } else {
+                    tl.testEnded(host);
+                }
+            } catch (Exception e) {
+                log.warn("Error encountered during shutdown",e);
             }
         }
         log.info("Test has ended");



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to