Skip to content

Commit

Permalink
Merge pull request #47 from vanniktech/cause
Browse files Browse the repository at this point in the history
Add cause to ConnectionClosedException.
  • Loading branch information
IvBaranov authored Oct 29, 2018
2 parents 782e3de + 63add7d commit 94a4533
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Flowable<Byte> observeByteStream() {
subscriber.onNext((byte) inputStream.read());
} catch (IOException e) {
connected = false;
subscriber.onError(new ConnectionClosedException("Can't read stream"));
subscriber.onError(new ConnectionClosedException("Can't read stream", e));
} finally {
if (!connected) {
closeConnection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@

public final class ConnectionClosedException extends IOException {

public ConnectionClosedException() {
super("Connection is closed.");
}

public ConnectionClosedException(String message) {
super(message);
public ConnectionClosedException(String message, Throwable cause) {
super(message, cause);
}
}

0 comments on commit 94a4533

Please sign in to comment.