You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/08/21 15:01:19 UTC
[08/32] httpcomponents-core git commit: Add ctor (useful from tests
to rethrow exceptions.)
Add ctor (useful from tests to rethrow exceptions.)
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/638d0382
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/638d0382
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/638d0382
Branch: refs/heads/api_javadocs
Commit: 638d03820440c31d371e6ac300c70973e4f470c2
Parents: 7bf157b
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Aug 7 13:16:57 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Aug 7 13:16:57 2018 -0600
----------------------------------------------------------------------
.../hc/core5/http/ConnectionClosedException.java | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/638d0382/httpcore5/src/main/java/org/apache/hc/core5/http/ConnectionClosedException.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/ConnectionClosedException.java b/httpcore5/src/main/java/org/apache/hc/core5/http/ConnectionClosedException.java
index 073f10f..ffbee69 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/ConnectionClosedException.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/ConnectionClosedException.java
@@ -39,14 +39,14 @@ public class ConnectionClosedException extends IOException {
private static final long serialVersionUID = 617550366255636674L;
/**
- * Creates a new ConnectionClosedException with a default message.
+ * Constructs a new ConnectionClosedException with a default message.
*/
public ConnectionClosedException() {
super("Connection is closed");
}
/**
- * Creates a new ConnectionClosedException with the specified detail message.
+ * Constructs a new ConnectionClosedException with the specified detail message.
*
* @param message The exception detail message
*/
@@ -54,4 +54,17 @@ public class ConnectionClosedException extends IOException {
super(HttpException.clean(message));
}
+ /**
+ * Constructs a {@code ConnectionClosedException} with the specified detail message
+ * and cause.
+ *
+ * @param message The exception detail message
+ * @param cause The cause.
+ *
+ * @since 5.0
+ */
+ public ConnectionClosedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
}