Author: sebb
Date: Sun Nov 25 06:31:13 2007
New Revision: 597994

URL: http://svn.apache.org/viewvc?rev=597994&view=rev
Log:
Give access to the Exception if one occurs

Modified:
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java?rev=597994&r1=597993&r2=597994&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java
 Sun Nov 25 06:31:13 2007
@@ -49,6 +49,9 @@
        /** True if the Daemon is currently running. */
        private volatile boolean running;
 
+       // Saves the error if one occurs
+       private volatile Exception except;
+       
        /**
         * Create a new Daemon with the specified port and target.
         * 
@@ -65,6 +68,7 @@
         * not exit until [EMAIL PROTECTED] #stopServer()} is called or an 
error occurs.
         */
        public void run() {
+               except = null;
                running = true;
                ServerSocket mainSocket = null;
 
@@ -94,6 +98,7 @@
                        }
                        log.info("HttpMirror Server stopped");
                } catch (Exception e) {
+                       except = e;
                        log.warn("HttpMirror Server stopped", e);
                } finally {
                        JOrphanUtils.closeQuietly(mainSocket);
@@ -102,5 +107,9 @@
 
        public void stopServer() {
                running = false;
+       }
+       
+       public Exception getException(){
+               return except;
        }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to