]> git.mxchange.org Git - juser-login-core.git/commitdiff
Added exception for mismatching password+repeated
authorRoland Häder <roland@mxchange.org>
Tue, 19 Apr 2016 12:30:08 +0000 (14:30 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 19 Apr 2016 12:30:08 +0000 (14:30 +0200)
src/org/mxchange/jusercore/exceptions/DataRepeatMismatchException.java
src/org/mxchange/jusercore/exceptions/EmailAddressAlreadyRegisteredException.java
src/org/mxchange/jusercore/exceptions/UserNotFoundException.java
src/org/mxchange/jusercore/exceptions/UserPasswordMismatchException.java
src/org/mxchange/jusercore/exceptions/UserPasswordRepeatMismatchException.java [new file with mode: 0644]
src/org/mxchange/jusercore/exceptions/UserStatusLockedException.java
src/org/mxchange/jusercore/exceptions/UserStatusUnconfirmedException.java

index eaca0572a246388e1a494f3d49a2a15b809a9445..7606d6e540a1587b19e88f238dca97f5042e66eb 100644 (file)
@@ -36,4 +36,5 @@ public class DataRepeatMismatchException extends Exception {
        public DataRepeatMismatchException (final String message) {
                super(message);
        }
+
 }
index 742fcce3855a01a4f21f3260a75c7fb9cf4717eb..261933cc88e315296eab43a9bdc55b02d2e60186 100644 (file)
@@ -40,4 +40,5 @@ public class EmailAddressAlreadyRegisteredException extends Exception {
                // Call super contructor
                super(MessageFormat.format("User {0} already registered with number {1} at record id {2}. Maybe forgot to call isRegistered(user) ?", user, user.getUserName(), user.getUserId()));
        }
+
 }
index 298640e9e4dade3bcfb00f8157a15289ef1713b6..c8710f71ad0881565661f051a31abd2c762c2f4b 100644 (file)
@@ -49,4 +49,5 @@ public class UserNotFoundException extends Exception {
        public UserNotFoundException (final Long userId) {
                super(MessageFormat.format("User id {0} not found.", userId)); //NOI18N
        }
+
 }
index a2a6486705119eb630f1a351eb35bb984252bb19..55db22b4450be33af52d9c8f80136fa4d1dfdfab 100644 (file)
@@ -40,4 +40,5 @@ public class UserPasswordMismatchException extends Exception {
        public UserPasswordMismatchException (final User user) {
                super(MessageFormat.format("Password for user {0} does not match stored password.", user));
        }
+
 }
diff --git a/src/org/mxchange/jusercore/exceptions/UserPasswordRepeatMismatchException.java b/src/org/mxchange/jusercore/exceptions/UserPasswordRepeatMismatchException.java
new file mode 100644 (file)
index 0000000..8a28369
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.exceptions;
+
+import java.text.MessageFormat;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An exception thrown when the entered password did not match the stored
+ * password.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public class UserPasswordRepeatMismatchException extends Exception {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 51_782_450_671_256_594L;
+
+       /**
+        * Creates an exception with given user instance
+        * <p>
+        * @param user User instance
+        */
+       public UserPasswordRepeatMismatchException (final User user) {
+               super(MessageFormat.format("Passwords don't match, userId={0}", user.getUserId()));
+       }
+
+}
index b63076a1c22ba468bc4e95bdb3051c0c2895e070..bb96e7ff45f7a648565bf1a6464d0f074dd21c51 100644 (file)
@@ -40,4 +40,5 @@ public class UserStatusLockedException extends Exception {
                // Call super contructor
                super(MessageFormat.format("User account with user name {0} is locked.", user.getUserName()));
        }
+
 }
index 1b3f280c6ad1022880c82fe2a002a1cb44c4bf02..543cb804c7032c2330dfdccb77ffa6ad8c72ea91 100644 (file)
@@ -40,4 +40,5 @@ public class UserStatusUnconfirmedException extends Exception {
                // Call super contructor
                super(MessageFormat.format("User account with user name {0} is unconfirmed.", user.getUserName()));
        }
+
 }