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

br.com.caelum.stella.validation.InvalidStateException Maven / Gradle / Ivy

There is a newer version: 2.1.7
Show newest version
package br.com.caelum.stella.validation;

import java.util.Arrays;
import java.util.List;

import br.com.caelum.stella.ValidationMessage;

/**
 * Sinaliza uma ocorrência de um valor inválido.
 * 
 * @author leobessa
 * 
 */
public class InvalidStateException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private final List validationMessages;

    public InvalidStateException(final ValidationMessage validationMessage) {
        this(Arrays.asList(validationMessage));
    }

    public InvalidStateException(List validationMessages) {
        super("Validation errors: " + validationMessages);
        this.validationMessages = validationMessages;
    }

    public List getInvalidMessages() {
        return validationMessages;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy