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

com.dell.isg.smi.commons.elm.exception.InvalidArgumentsException Maven / Gradle / Ivy

Go to download

Commons Exception and Localized Messaging (ELM) jar library for the System Management Integration (SMI) projects.

There is a newer version: 1.0.82
Show newest version
/**
 * Copyright ? 2017 DELL Inc. or its subsidiaries.  All Rights Reserved.
 */
/**
 *
 */
package com.dell.isg.smi.commons.elm.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

import com.dell.isg.smi.commons.elm.model.EnumErrorCode;

/**
 * This exception should be used when required input is not provided or is incorrect
 */
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public class InvalidArgumentsException extends RuntimeCoreException {

    private static final long serialVersionUID = 1L;


    // Default Constructor
    public InvalidArgumentsException() {
        // Implement it
    }


    public InvalidArgumentsException(String attributeName, Throwable e) {
        super(e);
        this.setErrorCode(EnumErrorCode.ENUM_INVALID_DATA);
        this.addAttribute(attributeName);
    }


    public InvalidArgumentsException(String attributeName) {
        super();
        this.setErrorCode(EnumErrorCode.ENUM_INVALID_DATA);
        this.addAttribute(attributeName);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy