aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/ValidationUtils.java
blob: 07505a2adb16155bc02dd2a41823e59863e48b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package org.openecomp.sdc.be.components.validation;

import org.openecomp.sdc.exception.ResponseFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ValidationUtils {

    private static final Logger LOGGER = LoggerFactory.getLogger(ValidationUtils.class);

    public static  <T> T throwValidationException(ResponseFormat responseFormat, String logMessage, Object ... logParams){
        LOGGER.error(logMessage, logParams);
        throw new ValidationException(responseFormat);
    }

}