org.loom.exception
Class EntityNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.persistence.PersistenceException
org.loom.exception.EntityNotFoundException
- All Implemented Interfaces:
- java.io.Serializable, HttpThrowable
public class EntityNotFoundException
- extends javax.persistence.PersistenceException
- implements HttpThrowable
An error produced when a persitent entity could not be found.
It will be delivered to the browser as a 404 error
- See Also:
- Serialized Form
Method Summary |
int |
getHttpError()
Entity not found is typically presented as a 404 error |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EntityNotFoundException
public EntityNotFoundException(java.lang.Class<?> entityClass,
java.lang.Object entityId)
EntityNotFoundException
public EntityNotFoundException(java.lang.Class<?> entityClass,
java.lang.Object entityId,
java.lang.Throwable cause)
EntityNotFoundException
public EntityNotFoundException(java.lang.Class<?> entityClass,
java.lang.Object entityId,
java.lang.String message)
EntityNotFoundException
public EntityNotFoundException(java.lang.Class<?> entityClass,
java.lang.Object entityId,
java.lang.String message,
java.lang.Throwable cause)
getHttpError
public int getHttpError()
- Entity not found is typically presented as a 404 error
- Specified by:
getHttpError
in interface HttpThrowable
- Returns:
- the HTTP error code that should be returned to the browser for this error.