Package main.utils.exception
Class ModelAlreadyExistsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
main.utils.exception.ModelAlreadyExistsException
- All Implemented Interfaces:
Serializable
The
ModelAlreadyExistsException
class is a custom exception that is thrown when an attempt is made to add a
model to a repository that already contains a model with the same ID.
It extends the Exception
class.- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new instance of theModelAlreadyExistsException
class with a default error message.ModelAlreadyExistsException
(String message) Creates a new instance of theModelAlreadyExistsException
class with a custom error message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ModelAlreadyExistsException
public ModelAlreadyExistsException()Creates a new instance of theModelAlreadyExistsException
class with a default error message. The default message is "Model already exists". -
ModelAlreadyExistsException
Creates a new instance of theModelAlreadyExistsException
class with a custom error message.- Parameters:
message
- The custom error message to be used.
-