java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.ntnu.idatt2106_2023_06.backend.exception.not_found.NotFoundException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AllergenNotFoundException, FileNotFoundException, FridgeItemsNotFoundException, FridgeMemberNotFoundException, FridgeNotFoundException, ImageNotFoundException, ItemNotFoundException, NotificationNotFoundException, RecipeNotFoundException, RecipeSuggestionNotFoundException, ShoppingItemsNotFoundException, StatNotFoundException, StoreNotFoundException, TokenNotFoundException, UserNotFoundException

public class NotFoundException extends RuntimeException
Exception thrown when an entity with a certain attribute value or ID cannot be found in the database.
Author:
Brage Halvorsen Kvamme, Trym Hamer Gudvangen
See Also:
  • Constructor Details

    • NotFoundException

      public NotFoundException(String attribute, String value)
      This method constructs a new NotFoundException with the given attribute name and value.
      Parameters:
      attribute - The name of the attribute that was searched for, given as a String
      value - The value of the attribute that was searched for, given as a String
    • NotFoundException

      public NotFoundException(String attribute, Long value)
      This method constructs a new NotFoundException with the given attribute name and ID.
      Parameters:
      attribute - The name of the attribute that was searched for, given as a String
      value - The ID of the entity that was searched for, given as a Long value