s/InterruptedException/InterruptedIOException/

(human)
This commit is contained in:
human
2004-04-20 15:43:04 +00:00
committed by zzz
parent 8038e1ee7d
commit 90350786e6
7 changed files with 9 additions and 19 deletions

View File

@ -101,9 +101,6 @@ public class EepHandler {
} catch (IOException ex) { } catch (IOException ex) {
_log.error("Error while handling eepsite request"); _log.error("Error while handling eepsite request");
return written; return written;
} catch (InterruptedException ex) {
_log.error("Error while handling eepsite request");
return written;
} catch (I2PException ex) { } catch (I2PException ex) {
_log.error("Error while handling eepsite request"); _log.error("Error while handling eepsite request");
return written; return written;

View File

@ -52,7 +52,6 @@ public class I2PTunnelClient extends I2PTunnelClientBase {
} catch (Exception ex) { } catch (Exception ex) {
_log.info("Error connecting", ex); _log.info("Error connecting", ex);
l.log(ex.getMessage()); l.log(ex.getMessage());
// s has been initialized before the try block...
closeSocket(s); closeSocket(s);
} }
} }

View File

@ -4,6 +4,7 @@
package net.i2p.i2ptunnel; package net.i2p.i2ptunnel;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.ConnectException; import java.net.ConnectException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.NoRouteToHostException; import java.net.NoRouteToHostException;
@ -157,7 +158,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
* @param dest The destination to connect to * @param dest The destination to connect to
* @return a new I2PSocket * @return a new I2PSocket
*/ */
public I2PSocket createI2PSocket(Destination dest) throws I2PException, ConnectException, NoRouteToHostException, InterruptedException { public I2PSocket createI2PSocket(Destination dest) throws I2PException, ConnectException, NoRouteToHostException, InterruptedIOException {
return createI2PSocket(dest, getDefaultOptions()); return createI2PSocket(dest, getDefaultOptions());
} }
@ -172,10 +173,10 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
* *
* @throws ConnectException if the peer refuses the connection * @throws ConnectException if the peer refuses the connection
* @throws NoRouteToHostException if the peer is not found or not reachable * @throws NoRouteToHostException if the peer is not found or not reachable
* @throws InterruptedException if the connection timeouts * @throws InterruptedIOException if the connection timeouts
* @throws I2PException if there is some other I2P-related problem * @throws I2PException if there is some other I2P-related problem
*/ */
public I2PSocket createI2PSocket(Destination dest, I2PSocketOptions opt) throws I2PException, ConnectException, NoRouteToHostException, InterruptedException { public I2PSocket createI2PSocket(Destination dest, I2PSocketOptions opt) throws I2PException, ConnectException, NoRouteToHostException, InterruptedIOException {
I2PSocket i2ps; I2PSocket i2ps;
synchronized (sockLock) { synchronized (sockLock) {

View File

@ -201,12 +201,6 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
l.log(ex.getMessage()); l.log(ex.getMessage());
handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy); handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy);
closeSocket(s); closeSocket(s);
} catch (InterruptedException ex) {
if (timeoutThread != null) timeoutThread.disable();
_log.info("Error trying to connect", ex);
l.log(ex.getMessage());
handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy);
closeSocket(s);
} catch (I2PException ex) { } catch (I2PException ex) {
if (timeoutThread != null) timeoutThread.disable(); if (timeoutThread != null) timeoutThread.disable();
_log.info("Error trying to connect", ex); _log.info("Error trying to connect", ex);

View File

@ -96,9 +96,6 @@ public abstract class SOCKSServer {
} catch (IOException e) { } catch (IOException e) {
throw new SOCKSException("Error connecting (" throw new SOCKSException("Error connecting ("
+ e.getMessage() + ")"); + e.getMessage() + ")");
} catch (InterruptedException e) {
throw new SOCKSException("Error connecting ("
+ e.getMessage() + ")");
} catch (I2PException e) { } catch (I2PException e) {
throw new SOCKSException("Error connecting (" throw new SOCKSException("Error connecting ("
+ e.getMessage() + ")"); + e.getMessage() + ")");

View File

@ -12,6 +12,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException;
import java.util.HashMap; import java.util.HashMap;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.ConnectException; import java.net.ConnectException;
@ -151,10 +152,10 @@ public class SAMStreamSession {
* receive-only session * receive-only session
* @throws ConnectException if the destination refuses connections * @throws ConnectException if the destination refuses connections
* @throws NoRouteToHostException if the destination can't be reached * @throws NoRouteToHostException if the destination can't be reached
* @throws InterruptedException if the connection timeouts * @throws InterruptedIOException if the connection timeouts
* @throws I2PException if there's another I2P-related error * @throws I2PException if there's another I2P-related error
*/ */
public boolean connect(int id, String dest, Properties props) throws I2PException, ConnectException, NoRouteToHostException, DataFormatException, InterruptedException, SAMInvalidDirectionException { public boolean connect(int id, String dest, Properties props) throws I2PException, ConnectException, NoRouteToHostException, DataFormatException, InterruptedIOException, SAMInvalidDirectionException {
if (!canCreate) { if (!canCreate) {
_log.debug("Trying to create an outgoing connection using a receive-only session"); _log.debug("Trying to create an outgoing connection using a receive-only session");
throw new SAMInvalidDirectionException("Trying to create connections through a receive-only session"); throw new SAMInvalidDirectionException("Trying to create connections through a receive-only session");

View File

@ -14,6 +14,7 @@ import java.io.DataInputStream;
import java.io.EOFException; import java.io.EOFException;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.Socket; import java.net.Socket;
@ -598,7 +599,7 @@ public class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatag
_log.debug("STREAM CONNECT failed: " + e.getMessage()); _log.debug("STREAM CONNECT failed: " + e.getMessage());
return writeString("STREAM STATUS RESULT=CANT_REACH_PEER ID=" return writeString("STREAM STATUS RESULT=CANT_REACH_PEER ID="
+ id + "\n"); + id + "\n");
} catch (InterruptedException e) { } catch (InterruptedIOException e) {
_log.debug("STREAM CONNECT failed: " + e.getMessage()); _log.debug("STREAM CONNECT failed: " + e.getMessage());
return writeString("STREAM STATUS RESULT=TIMEOUT ID=" return writeString("STREAM STATUS RESULT=TIMEOUT ID="
+ id + "\n"); + id + "\n");