From 365bc6bb67955c5d1d1c051d85690bb8725ce877 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 11 Aug 2011 18:24:13 +1000 Subject: [PATCH] 353073 use java.net ProtocolException --- .../jetty/websocket/WebSocketClient.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketClient.java b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketClient.java index 2d8da49353c..57c230ee1cb 100644 --- a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketClient.java +++ b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketClient.java @@ -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. */