Package ninja.exceptions
Class NinjaException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ninja.exceptions.NinjaException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException
,ForbiddenRequestException
,InternalServerErrorException
,RenderingException
,RequestNotFoundException
public class NinjaException extends RuntimeException
A convenience unchecked exception. Allows you to wrap any exception (checked or unchecked) and throw it. Should signal a html error 400 - bad request (the client sent something strange). Useful inside controllers or filters for instance. Ninja is supposed to pick it up and render an appropriate error page.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NinjaException(int httpStatus, String httpMessage)
NinjaException(int httpStatus, String httpMessage, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHttpStatus()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-