Skip to content

Commit 119ef1e

Browse files
robertroeserstevegury
authored andcommitted
adding an exception classed TransportException which is thrown when there is an exception with the underlying transport (#81)
1 parent 05d8bd1 commit 119ef1e

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed

Diff for: build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ if (project.hasProperty('release.useLastTag')) {
3737
test {
3838
testLogging.showStandardStreams = true
3939
}
40+
41+
compileJava {
42+
sourceCompatibility = 1.8
43+
targetCompatibility = 1.8
44+
}

Diff for: src/main/java/io/reactivesocket/DuplexConnection.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,16 @@
1515
*/
1616
package io.reactivesocket;
1717

18-
import java.io.Closeable;
19-
20-
import org.reactivestreams.Publisher;
21-
2218
import io.reactivesocket.rx.Completable;
2319
import io.reactivesocket.rx.Observable;
20+
import org.reactivestreams.Publisher;
21+
22+
import java.io.Closeable;
2423

2524
/**
2625
* Represents a connection with input/output that the protocol uses.
2726
*/
2827
public interface DuplexConnection extends Closeable {
29-
// TODO should we call this 'Connection'? 'SocketConnection'? 'ReactiveSocketConnection'?
3028

3129
Observable<Frame> getInput();
3230

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* Copyright 2015 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.reactivesocket.exceptions;
17+
18+
public class TransportException extends Throwable {
19+
public TransportException(Throwable t) {
20+
super(t);
21+
}
22+
23+
@Override
24+
public synchronized Throwable fillInStackTrace() {
25+
return this;
26+
}
27+
28+
}

0 commit comments

Comments
 (0)