ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/junit/remote Server.java Messenger.java
Date Fri, 01 Feb 2002 19:55:48 GMT
sbailliez    02/02/01 11:55:48

  Modified:    proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/junit/remote
                        Server.java Messenger.java
  Log:
  - Dirty exception handling for now.
  
  Revision  Changes    Path
  1.7       +11 -5     jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/junit/remote/Server.java
  
  Index: Server.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/junit/remote/Server.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Server.java	30 Jan 2002 21:05:53 -0000	1.6
  +++ Server.java	1 Feb 2002 19:55:48 -0000	1.7
  @@ -125,15 +125,21 @@
       public void cancel() {
           if (isRunning()) {
               TestRunEvent evt = new TestRunEvent(new Integer(-1), TestRunEvent.RUN_STOP);
  -            messenger.writeEvent(evt);
  +            try {
  +                messenger.writeEvent(evt);
  +            } catch (IOException e){
  +            }
           }
       }
   
       /** shutdown the server and any running client */
       public void shutdown() {
  -        if (messenger != null) {
  -            messenger.close();
  -            messenger = null;
  +        try {
  +            if (messenger != null) {
  +                messenger.close();
  +                messenger = null;
  +            }
  +        } catch (IOException e){
           }
           try {
               if (client != null) {
  @@ -165,7 +171,7 @@
                   while ( (evt = messenger.read()) != null ) {
                       dispatcher.dispatchEvent(evt);
                   }
  -            } catch (IOException e) {
  +            } catch (Exception e) {
                   //@fixme this stacktrace might be normal when closing
                   // the socket. So decompose the above in distinct steps
                   e.printStackTrace();
  
  
  
  1.2       +1 -1      jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/junit/remote/Messenger.java
  
  Index: Messenger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/junit/remote/Messenger.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Messenger.java	30 Jan 2002 21:06:49 -0000	1.1
  +++ Messenger.java	1 Feb 2002 19:55:48 -0000	1.2
  @@ -90,7 +90,7 @@
           }
       }
   
  -    public TestRunEvent read() throws IOException {
  +    public TestRunEvent read() throws Exception {
           return (TestRunEvent)((ObjectInputStream)in).readObject();
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message