You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2018/08/14 03:54:05 UTC

httpcomponents-core git commit: Better formatting of exception message (port from 4.4.x.)

Repository: httpcomponents-core
Updated Branches:
  refs/heads/master 1493fcb15 -> 6ba01c86b


Better formatting of exception message (port from 4.4.x.)

Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/6ba01c86
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/6ba01c86
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/6ba01c86

Branch: refs/heads/master
Commit: 6ba01c86bdff9b65cbea7684922be601d68276a6
Parents: 1493fcb
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 13 21:54:03 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 13 21:54:03 2018 -0600

----------------------------------------------------------------------
 .../apache/hc/core5/http/ContentTooLongException.java   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6ba01c86/httpcore5/src/main/java/org/apache/hc/core5/http/ContentTooLongException.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/ContentTooLongException.java b/httpcore5/src/main/java/org/apache/hc/core5/http/ContentTooLongException.java
index 8da1bbd..a193324 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/ContentTooLongException.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/ContentTooLongException.java
@@ -47,4 +47,16 @@ public class ContentTooLongException extends IOException {
         super(HttpException.clean(message));
     }
 
+    /**
+     * Constructs a new ContentTooLongException with the specified detail message.
+     *
+     * @param format The exception detail message format; see {@link String#format(String, Object...)}.
+     * @param args The exception detail message arguments; see {@link String#format(String, Object...)}.
+     *
+     * @since 4.4.11
+     */
+    public ContentTooLongException(final String format, final Object... args) {
+        super(HttpException.clean(String.format(format, args)));
+    }
+
 }