Class UserExistsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.ntnu.idatt2106_2023_06.backend.exception.exists.ExistsException
edu.ntnu.idatt2106_2023_06.backend.exception.exists.UserExistsException
- All Implemented Interfaces:
Serializable
Exception thrown when attempting to create a new user with a username that already exists in the system.
- Author:
- Brage Halvorsen Kvamme, Trym Hamer Gudvangen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUserExistsException
(String username) This method constructs a new UserExistsException with the provided username.UserExistsException
(String attribute, String value) This method constructs a new UserExistsException with the provided attribute and value. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UserExistsException
This method constructs a new UserExistsException with the provided username.- Parameters:
username
- The username that already exists, given as a String
-
UserExistsException
This method constructs a new UserExistsException with the provided attribute and value.- Parameters:
attribute
- The attribute of the user that already exists, given as a Stringvalue
- The value of the attribute that already exists, given as a String
-