Пример #1
0
 public void setPass(String pass) {
   if (pass.length() < 20) {
     this.pass = pass;
   } else {
     try {
       throw new UserException(UserException.MSG_PASS_NO_VALIDA, UserException.COD_PASS_NO_VALIDO);
     } catch (UserException e) {
       e.printStackTrace();
     }
   }
 }
Пример #2
0
 public void setUser(String user) {
   if (user.length() < 10) {
     this.user = user;
   } else {
     try {
       throw new UserException(UserException.MSG_USU_NO_VALIDO, UserException.COD_USU_NO_VALIDO);
     } catch (UserException e) {
       e.printStackTrace();
     }
   }
 }