Class ItemNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
edu.ntnu.idatt2106_2023_06.backend.exception.not_found.NotFoundException
edu.ntnu.idatt2106_2023_06.backend.exception.not_found.ItemNotFoundException
- All Implemented Interfaces:
Serializable
This exception is thrown when an item is not found in the database. It extends the NotFoundException class.
- Author:
- Brage Halvorsen Kvamme, Trym Hamer Gudvangen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionItemNotFoundException
(Long itemId) This method constructs a new ItemNotFoundException with the given itemId.ItemNotFoundException
(String itemName) This method constructs a new ItemNotFoundException with the given itemName. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ItemNotFoundException
This method constructs a new ItemNotFoundException with the given itemName.- Parameters:
itemName
- The name of the item that was not found, given as a String.
-
ItemNotFoundException
This method constructs a new ItemNotFoundException with the given itemId.- Parameters:
itemId
- The id of the item that was not found, given as a Long Object.
-