From: Roland Häder Date: Thu, 21 Apr 2016 13:40:58 +0000 (+0200) Subject: Added constructor for userName X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8af893e4190313c88b4012e8a928935ddf432352;p=juser-login-core.git Added constructor for userName --- diff --git a/src/org/mxchange/jusercore/exceptions/UserNameAlreadyRegisteredException.java b/src/org/mxchange/jusercore/exceptions/UserNameAlreadyRegisteredException.java index dabf451..f32fbb1 100644 --- a/src/org/mxchange/jusercore/exceptions/UserNameAlreadyRegisteredException.java +++ b/src/org/mxchange/jusercore/exceptions/UserNameAlreadyRegisteredException.java @@ -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 + *

+ * @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)); + } + }