Class AbortWithHttpErrorCodeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.wicket.request.RequestHandlerExecutor.ReplaceHandlerException
-
- org.apache.wicket.request.flow.ResetResponseException
-
- org.apache.wicket.request.http.flow.AbortWithHttpErrorCodeException
-
- All Implemented Interfaces:
Serializable
public final class AbortWithHttpErrorCodeException extends ResetResponseException
Causes Wicket to abort processing and set the specified HTTP error code, with the provided message if specified.- Author:
- igor.vaynberg
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbortWithHttpErrorCodeException(int errorCode)
ConstructorAbortWithHttpErrorCodeException(int errorCode, String message)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getErrorCode()
Gets the error code.String
getMessage()
Gets the error message-
Methods inherited from class org.apache.wicket.request.RequestHandlerExecutor.ReplaceHandlerException
fillInStackTrace, getRemoveScheduled, getReplacementRequestHandler
-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AbortWithHttpErrorCodeException
public AbortWithHttpErrorCodeException(int errorCode, String message)
Constructor- Parameters:
errorCode
- the servlet error code; use one of theHttpServletResponse
constantsmessage
- the optional message to send to the client- See Also:
HttpServletResponse
-
AbortWithHttpErrorCodeException
public AbortWithHttpErrorCodeException(int errorCode)
Constructor- Parameters:
errorCode
- the servlet error code; use one of theHttpServletResponse
constants- See Also:
HttpServletResponse
-
-
Method Detail
-
getErrorCode
public int getErrorCode()
Gets the error code.- Returns:
- errorCode
- See Also:
HttpServletResponse
-
getMessage
public String getMessage()
Gets the error message- Overrides:
getMessage
in classThrowable
- Returns:
- error message
-
-