File tree Expand file tree Collapse file tree
src/java/org/apache/commons/codec Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818package org .apache .commons .codec ;
1919
2020/**
21- * Thrown when a Decoder has encountered a failure condition during a decode.
21+ * Thrown when a Decoder has encountered a failure condition during a decode.
2222 *
2323 * @author Apache Software Foundation
2424 * @version $Id$
@@ -33,13 +33,38 @@ public class DecoderException extends Exception {
3333 private static final long serialVersionUID = 1L ;
3434
3535 /**
36- * Creates a DecoderException
36+ * Creates a DecoderException.
3737 *
38- * @param message A message with meaning to a human
38+ * @param message
39+ * The detail message which is saved for later retrieval by the {@link #getMessage()} method.
3940 */
4041 public DecoderException (String message ) {
4142 super (message );
4243 }
4344
44- }
45+ /**
46+ * Creates a DecoderException.
47+ *
48+ * @param cause
49+ * The cause which is saved for later retrieval by the {@link #getCause()} method. A <code>null</code>
50+ * value is permitted, and indicates that the cause is nonexistent or unknown.
51+ * @since 1.4
52+ */
53+ public DecoderException (Throwable cause ) {
54+ super (cause );
55+ }
4556
57+ /**
58+ * Creates a DecoderException.
59+ *
60+ * @param message
61+ * The detail message which is saved for later retrieval by the {@link #getMessage()} method.
62+ * @param cause
63+ * The cause which is saved for later retrieval by the {@link #getCause()} method. A <code>null</code>
64+ * value is permitted, and indicates that the cause is nonexistent or unknown.
65+ * @since 1.4
66+ */
67+ public DecoderException (String message , Throwable cause ) {
68+ super (message , cause );
69+ }
70+ }
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ public static final byte[] decodeUrl(byte[] bytes) throws DecoderException {
178178 int l = toCharacterDigit (bytes [++i ]);
179179 buffer .write ((char ) ((u << 4 ) + l ));
180180 } catch (ArrayIndexOutOfBoundsException e ) {
181- throw new DecoderException ("Invalid URL encoding: " );
181+ throw new DecoderException ("Invalid URL encoding: " , e );
182182 }
183183 } else {
184184 buffer .write (b );
You can’t perform that action at this time.
0 commit comments