Class EntityNotFoundException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.ucsb.cs156.frontiers.errors.EntityNotFoundException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
StudentNotOnRosterException

public class EntityNotFoundException 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 is not found.
See Also:
  • Constructor Details

    • EntityNotFoundException

      public EntityNotFoundException(Class<?> entityType, Object id)
      Constructor for the exception
      Parameters:
      entityType - The class of the entity that was not found, e.g. User.class
      id - the id that was being searched for
    • EntityNotFoundException

      protected EntityNotFoundException(String message)
      Constructor for subclasses that describe what was not found in their own words.
      Parameters:
      message - the full message of the exception