All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.moon.core.util.RequireValidateException Maven / Gradle / Ivy

package com.moon.core.util;

import com.moon.core.enums.Arrays2;
import com.moon.core.lang.StringUtil;

/**
 * @author moonsky
 */
public class RequireValidateException extends IllegalArgumentException {

    private final static Object[] EMPTY = Arrays2.OBJECTS.empty();

    private static Object[] notEmpty(Object... values) {
        return values == null ? EMPTY : values;
    }

    public RequireValidateException(String message) { super(message); }

    public RequireValidateException(String messageTemplate, Object... params) {
        super(StringUtil.format(messageTemplate, notEmpty(params)));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy