353073 use java.net ProtocolException
This commit is contained in:
parent
8ae43e9bea
commit
365bc6bb67
|
@ -3,6 +3,7 @@ package org.eclipse.jetty.websocket;
|
|||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.ProtocolException;
|
||||
import java.net.URI;
|
||||
import java.nio.channels.ByteChannel;
|
||||
import java.nio.channels.SelectionKey;
|
||||
|
@ -237,6 +238,10 @@ public class WebSocketClient extends AggregateLifeCycle
|
|||
Throwable cause = e.getCause();
|
||||
if (cause instanceof IOException)
|
||||
throw (IOException)cause;
|
||||
if (cause instanceof Error)
|
||||
throw (Error)cause;
|
||||
if (cause instanceof RuntimeException)
|
||||
throw (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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue