package com.rollbar.payload.utilities;

public class InvalidLengthException extends IllegalArgumentException {
    public static InvalidLengthException TooLong(String parameter, int len) {
        final String msgFmt = "%s too long (over %d)";
        return new InvalidLengthException(String.format(msgFmt, parameter, len));
    }

    public static InvalidLengthException TooShort(String parameter, int len) {
        final String msgFmt = "%s too short (under %d)";
        return new InvalidLengthException(String.format(msgFmt, parameter, len));
    }

    private InvalidLengthException(String message) {
        super(message);
    }
}

@@ -37,300 +37,860 @@
 s;%0A%0A
-public class InvalidLengthException extends IllegalArgumentException %7B%0A    public static InvalidLengthException TooLong(String parameter, int len) %7B%0A        final String msgFmt = %22%25s too long (over %25d)%22;%0A        return new InvalidLengthException(String.format(msgFmt, parameter, len));%0A    %7D%0A
+/**%0A * An IllegalArgumentException indicating an argument that's too long or too short.%0A */%0Apublic class InvalidLengthException extends IllegalArgumentException %7B%0A    /**%0A     * Static Factory making an exception indicating an argument was passed that was too long.%0A     * @param parameter the parameter that was too long%0A     * @param len the maximum length%0A     * @return the exception%0A     */%0A    public static InvalidLengthException TooLong(String parameter, int len) %7B%0A        final String msgFmt = %22%25s too long (over %25d)%22;%0A        return new InvalidLengthException(String.format(msgFmt, parameter, len));%0A    %7D%0A%0A    /**%0A     * Static Factory making an exception indicating an argument was passed that was too short.%0A     * @param parameter the parameter that was too short%0A     * @param len the minimum length%0A     * @return the exception%0A     */
 %0A   

Document IllegalLengthException