parent
d5399a7677
commit
ed01815caf
|
@ -30,9 +30,12 @@ public class UserAccountService {
|
|||
for (ConstraintViolation<UserAccount> constraintViolation : violations) {
|
||||
sb.append(constraintViolation.getMessage());
|
||||
}
|
||||
|
||||
dao.addUserAccount(useraccount);
|
||||
|
||||
throw new ConstraintViolationException("Error occurred: " + sb.toString(), violations);
|
||||
}
|
||||
dao.addUserAccount(useraccount);
|
||||
|
||||
return "Account for " + useraccount.getName() + " Added!";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue