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:35 UTC

[24/32] httpcomponents-core git commit: Better formatting of exception message (port from 4.4.x.)

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/9aeb6a0d
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9aeb6a0d
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9aeb6a0d

Branch: refs/heads/api_javadocs
Commit: 9aeb6a0d42ffd9630faa1575861ddcb7dac33df8
Parents: 6b63fc1
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 13 21:54:03 2018 -0600
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Aug 14 09:29:13 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9aeb6a0d/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)));
+    }
+
 }