ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/XMLReader/UDPReader.java
(Generate patch)

Comparing experimental/server/XMLReader/UDPReader.java (file contents):
Revision 1.7 by pjm2, Tue Nov 21 09:38:27 2000 UTC vs.
Revision 1.8 by pjm2, Tue Nov 21 10:11:21 2000 UTC

# Line 26 | Line 26 | public class UDPReader extends Thread{
26              socket = new DatagramSocket(port);
27          }
28          catch (BindException e){
29 <            System.out.println("Some other process is already listening on port "+port+".");
30 <            System.out.println("Please specify another port number on the command line.");
29 >            logger.write(this.toString(), Logger.SYSMSG, "Could not start the UDPReader thread on port "+port+" as this port was already in use.");
30              return;
31          }
32          catch (Exception e){
33 <            System.out.println("An exception occured while creating the DatagramSocket.");
33 >            logger.write(this.toString(), Logger.SYSMSG, "Could not start the UDPReader thread on port "+port+".");
34              return;
35          }
36          
37 <        System.out.println("UDPReader ready and listening for UDP packets on port "+port);
37 >        logger.write(this.toString(), Logger.SYSMSG, "UDPReader thread ready and listening for UDP packets on port "+port);
38  
39          byte[] buf;
40          
# Line 50 | Line 49 | public class UDPReader extends Thread{
49                  t.run(packet);
50              }
51              catch (IOException e) {
52 <                System.out.println("An exception occured in the UDPReader!");
53 <                e.printStackTrace();
52 >                logger.write(this.toString(), Logger.SYSMSG, "The UDPReader thread has been shut down as an exception occured: "+e);
53 >                return;
54              }
55          }
56          socket.close();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines