353073 use java.net ProtocolException

This commit is contained in:
Greg Wilkins 2011-08-11 18:24:13 +10:00
parent 8ae43e9bea
commit 365bc6bb67
1 changed files with 5 additions and 12 deletions

View File

@ -3,6 +3,7 @@ package org.eclipse.jetty.websocket;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.ProtocolException;
import java.net.URI; import java.net.URI;
import java.nio.channels.ByteChannel; import java.nio.channels.ByteChannel;
import java.nio.channels.SelectionKey; import java.nio.channels.SelectionKey;
@ -237,6 +238,10 @@ public class WebSocketClient extends AggregateLifeCycle
Throwable cause = e.getCause(); Throwable cause = e.getCause();
if (cause instanceof IOException) if (cause instanceof IOException)
throw (IOException)cause; throw (IOException)cause;
if (cause instanceof Error)
throw (Error)cause;
if (cause instanceof RuntimeException)
throw (RuntimeException)cause;
throw new RuntimeException(cause); throw new RuntimeException(cause);
} }
} }
@ -543,18 +548,6 @@ public class WebSocketClient extends AggregateLifeCycle
} }
/* ------------------------------------------------------------ */
/** Exception recording a WebSocket handshake protocol exception.
*/
class ProtocolException extends IOException
{
ProtocolException(String reason)
{
super(reason);
}
}
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/** The Future Websocket Connection. /** The Future Websocket Connection.
*/ */