]> git.mxchange.org Git - juser-login-core.git/commitdiff
Added constructor for userName
authorRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 13:40:58 +0000 (15:40 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 21 Apr 2016 13:40:58 +0000 (15:40 +0200)
src/org/mxchange/jusercore/exceptions/UserNameAlreadyRegisteredException.java

index dabf4519839bb3d3cb687e39322208c8fc30c3b4..f32fbb1f793414d5ee89ca264ed6fc3e84f5fae9 100644 (file)
@@ -41,4 +41,14 @@ public class UserNameAlreadyRegisteredException extends Exception {
                super(MessageFormat.format("User name {0} already registered at record id {1}. Maybe forgot to call isRegistered(user) ?", user.getUserName(), user.getUserId()));
        }
 
+       /**
+        * Constructor with already registered user name
+        * <p>
+        * @param userName User name
+        */
+       public UserNameAlreadyRegisteredException (final String userName) {
+               // Call super contructor
+               super(MessageFormat.format("User name {0} already used. Maybe forgot to call isRegistered(user) ?", userName));
+       }
+
 }