sebb        2004/01/06 16:36:31

  Modified:    src/core/org/apache/jmeter/samplers
                        RemoteListenerWrapper.java
  Log:
  Catch and log more errors
  
  Revision  Changes    Path
  1.10      +16 -16    
jakarta-jmeter/src/core/org/apache/jmeter/samplers/RemoteListenerWrapper.java
  
  Index: RemoteListenerWrapper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/samplers/RemoteListenerWrapper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RemoteListenerWrapper.java        9 Oct 2003 18:51:08 -0000       1.9
  +++ RemoteListenerWrapper.java        7 Jan 2004 00:36:31 -0000       1.10
  @@ -27,7 +27,7 @@
       implements SampleListener, TestListener, Serializable, NoThreadClone
   {
       transient private static Logger log = LoggingManager.getLoggerForClass();
  -    RemoteSampleListener listener;
  +    private RemoteSampleListener listener = null;
       
       private boolean holdSamples; //Hold samples to end of test?
       private List sampleStore; // Samples stored here
  @@ -52,21 +52,21 @@
   
       public void testStarted()
       {
  -     log.info("Test Started()"); // should this be debug?
  +     log.info("Test Started()");
        setUpStore();
           try
           {
              listener.testStarted();
           }
  -        catch (Exception ex)
  +        catch (Throwable ex)
           {
  -            log.error("", ex);
  +            log.warn("testStarted()", ex);
           }
   
       }
       public void testEnded()
       {
  -     log.debug("Test ended");
  +     log.info("Test ended()");
           try
           {
                if (holdSamples){
  @@ -79,9 +79,9 @@
               listener.testEnded();
               sampleStore = null;
           }
  -        catch (Exception ex)
  +        catch (Throwable ex)
           {
  -            log.error("", ex);
  +            log.warn("testEnded()", ex);
           }
       }
       public void testStarted(String host)
  @@ -92,14 +92,14 @@
           {
               listener.testStarted(host);
           }
  -        catch (Exception ex)
  +        catch (Throwable ex)
           {
  -            log.error("", ex);
  +            log.error("testStarted(host)", ex);
           }
       }
       public void testEnded(String host)
       {
  -     log.info("Test Ended"); // should this be debug?
  +     log.info("Test Ended on " + host); // should this be debug?
           try
           {
                if (holdSamples){
  @@ -112,9 +112,9 @@
               listener.testEnded(host);
               sampleStore = null;
           }
  -        catch (Exception ex)
  +        catch (Throwable ex)
           {
  -            log.error("", ex);
  +            log.error("testEnded(host)", ex);
           }
       }
   
  @@ -131,7 +131,7 @@
           }
           catch (RemoteException err)
           {
  -            log.error("", err);
  +            log.error("sampleOccurred", err);
           }
       }
   
  @@ -152,7 +152,7 @@
           }
           catch (RemoteException err)
           {
  -            log.error("", err);
  +            log.error("sampleStarted", err);
           }
       }
       public void sampleStopped(SampleEvent e)
  @@ -164,7 +164,7 @@
           }
           catch (RemoteException err)
           {
  -            log.error("", err);
  +            log.error("sampleStopped", err);
           }
       }
       /* (non-Javadoc)
  
  
  

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

Reply via email to