Class ExistsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.ntnu.idatt2106_2023_06.backend.exception.exists.ExistsException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CategoryExistsException,FileAlreadyExistsException,UserExistsException
An exception that is thrown when an entity already exists in the system.
- Author:
- Brage Halvorsen Kvamme, Trym Hamer Gudvangen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExistsException(String attribute, Long value) This method constructs a new ExistsException with the given attribute and value.ExistsException(String attribute, String value) This method constructs a new ExistsException with the given attribute and value.ExistsException(String type, String attribute, String value) This method constructs a new ExistsException with the given type, 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
-
ExistsException
This method constructs a new ExistsException with the given attribute and value.- Parameters:
attribute- The name of the attribute that already exists, given as a Stringvalue- The value of the attribute that already exists, given as a String
-
ExistsException
This method constructs a new ExistsException with the given attribute and value.- Parameters:
attribute- The name of the attribute that already exists, given as a Stringvalue- The value of the attribute that already exists, given as a Long object
-
ExistsException
This method constructs a new ExistsException with the given type, attribute, and value.- Parameters:
type- The type of the entity that already exists, given as a Stringattribute- The name of the attribute that already exists, given as a Stringvalue- The value of the attribute that already exists, given as a String
-