br.com.caelum.stella.validation.InvalidStateException Maven / Gradle / Ivy
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