From 8af893e4190313c88b4012e8a928935ddf432352 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Apr 2016 15:40:58 +0200 Subject: [PATCH] Added constructor for userName --- .../exceptions/UserNameAlreadyRegisteredException.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)); + } + } -- 2.39.5