Class EntityAlreadyExistsException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.ucsb.cs156.rec.errors.EntityAlreadyExistsException
All Implemented Interfaces:
Serializable

public class EntityAlreadyExistsException extends RuntimeException
This is an error class for a custom RuntimeException in Java that is used to indicate when an entity of a specific type with a given ID already exists in the repository.
See Also:
  • Constructor Details

    • EntityAlreadyExistsException

      public EntityAlreadyExistsException(Class<?> entityType, Object type)
      Constructor for the exception
      Parameters:
      entityType - The class of the entity that already existed, e.g. User.class
      type - the type that was trying to be saved