Package dev.daymor.sakuraboot.exceptions
Class NotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.daymor.sakuraboot.exceptions.SuperException
dev.daymor.sakuraboot.exceptions.NotFoundException
- All Implemented Interfaces:
Serializable
Represents an exception indicating that the requested object wasn't found.
Extends the
SuperException
class and sets the HTTP status to 404 Not
Found.- Since:
- 0.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNotFoundException
(Class<?> objectClass, Object id) Constructs a new NotFoundException with the given object class and expected ID.NotFoundException
(String objectName) Constructs a new NotFoundException with the given object name.NotFoundException
(String objectName, Object id) Constructs a new NotFoundException with the given object name and expected ID. -
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
Constructs a new NotFoundException with the given object name.- Parameters:
objectName
- The name of the object that wasn't found.
-
NotFoundException
Constructs a new NotFoundException with the given object name and expected ID.- Parameters:
objectName
- The name of the object that wasn't found.id
- The id of the object that wasn't found.
-
NotFoundException
Constructs a new NotFoundException with the given object class and expected ID.- Parameters:
objectClass
- The class of the object that wasn't found.id
- The id of the object that wasn't found.
-