use of org.superbiz.webapp1.messages.ErrorList in project tomee by apache.
the class ConstraintViolationExceptionMapper method getConstraintViolationErrors.
private static Object getConstraintViolationErrors(final ConstraintViolationException ex) {
final List<ErrorResponse> errors = new ArrayList<ErrorResponse>();
for (final ConstraintViolation violation : ex.getConstraintViolations()) {
final ErrorResponse error = new ErrorResponse();
error.setMessage(violation.getMessage());
errors.add(error);
}
return new ErrorList<ErrorResponse>(errors);
}
use of org.superbiz.webapp1.messages.ErrorList in project tomee by apache.
the class ConstraintViolationExceptionMapper method getConstraintViolationErrors.
private static Object getConstraintViolationErrors(final ConstraintViolationException ex) {
final List<ErrorResponse> errors = new ArrayList<ErrorResponse>();
for (final ConstraintViolation violation : ex.getConstraintViolations()) {
final ErrorResponse error = new ErrorResponse();
error.setMessage(violation.getMessage());
errors.add(error);
}
return new ErrorList<ErrorResponse>(errors);
}
Aggregations