Committed by
Gerrit Code Review
Do not wrap exception with TransportException
Change-Id: Ifd59da2a78a7c95a78758cbcf7a5fe015ed25f13
Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -37,10 +37,10 @@ import com.google.common.base.Throwables; | ... | @@ -37,10 +37,10 @@ import com.google.common.base.Throwables; |
37 | import com.google.common.collect.Maps; | 37 | import com.google.common.collect.Maps; |
38 | 38 | ||
39 | import static com.google.common.base.Preconditions.checkNotNull; | 39 | import static com.google.common.base.Preconditions.checkNotNull; |
40 | +import io.atomix.catalyst.serializer.SerializationException; | ||
40 | import io.atomix.catalyst.transport.Address; | 41 | import io.atomix.catalyst.transport.Address; |
41 | import io.atomix.catalyst.transport.Connection; | 42 | import io.atomix.catalyst.transport.Connection; |
42 | import io.atomix.catalyst.transport.MessageHandler; | 43 | import io.atomix.catalyst.transport.MessageHandler; |
43 | -import io.atomix.catalyst.transport.TransportException; | ||
44 | import io.atomix.catalyst.util.Assert; | 44 | import io.atomix.catalyst.util.Assert; |
45 | import io.atomix.catalyst.util.Listener; | 45 | import io.atomix.catalyst.util.Listener; |
46 | import io.atomix.catalyst.util.Listeners; | 46 | import io.atomix.catalyst.util.Listeners; |
... | @@ -127,8 +127,8 @@ public class CopycatTransportConnection implements Connection { | ... | @@ -127,8 +127,8 @@ public class CopycatTransportConnection implements Connection { |
127 | } | 127 | } |
128 | handleResponse(r, e, result, context); | 128 | handleResponse(r, e, result, context); |
129 | }); | 129 | }); |
130 | - } catch (Exception e) { | 130 | + } catch (SerializationException | IOException e) { |
131 | - result.completeExceptionally(new TransportException("Failed to send request", e)); | 131 | + result.completeExceptionally(e); |
132 | } | 132 | } |
133 | return result; | 133 | return result; |
134 | } | 134 | } | ... | ... |
-
Please register or login to post a comment