Ignore:
Timestamp:
2014-01-06T16:39:45+01:00 (12 years ago)
Author:
Don-vip
Message:

global replacement of e.printStackTrace() by Main.error(e)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java

    r6248 r6643  
    4040                    Integer.toString(port), ex.getLocalizedMessage());
    4141        } catch (IOException ioe) {
    42             ioe.printStackTrace();
     42            Main.error(ioe);
    4343        }
    4444    }
     
    5454                instance = null;
    5555            } catch (IOException ioe) {
    56                 ioe.printStackTrace();
     56                Main.error(ioe);
    5757            }
    5858        }
     
    6464     * @throws IOException when connection errors
    6565     */
    66     public RemoteControlHttpServer(int port)
    67         throws IOException
    68     {
     66    public RemoteControlHttpServer(int port) throws IOException {
    6967        super("RemoteControl HTTP Server");
    7068        this.setDaemon(true);
     
    8179     */
    8280    @Override
    83     public void run()
    84     {
     81    public void run() {
    8582        Main.info(marktr("RemoteControl::Accepting connections on port {0}"),
    8683             Integer.toString(server.getLocalPort()));
    87         while (true)
    88         {
    89             try
    90             {
     84        while (true) {
     85            try {
    9186                Socket request = server.accept();
    9287                RequestProcessor.processRequest(request);
    93             }
    94             catch( SocketException se)
    95             {
     88            } catch( SocketException se) {
    9689                if( !server.isClosed() )
    97                     se.printStackTrace();
    98                 }
    99             catch (IOException ioe)
    100             {
    101                 ioe.printStackTrace();
     90                    Main.error(se);
     91            } catch (IOException ioe) {
     92                Main.error(ioe);
    10293            }
    10394        }
     
    109100     * @throws IOException
    110101     */
    111     public void stopServer() throws IOException
    112     {
     102    public void stopServer() throws IOException {
    113103        server.close();
    114104        Main.info(marktr("RemoteControl::Server stopped."));
Note: See TracChangeset for help on using the changeset viewer.