Class NotFoundException
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
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 Summary
ConstructorsConstructorDescriptionNotFoundException(String attribute, Long value) This method constructs a new NotFoundException with the given attribute name and ID.NotFoundException(String attribute, String value) This method constructs a new NotFoundException with the given attribute name 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
-
NotFoundException
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 Stringvalue- The value of the attribute that was searched for, given as a String
-
NotFoundException
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 Stringvalue- The ID of the entity that was searched for, given as a Long value
-