Class AbortWithHttpErrorCodeException

  • All Implemented Interfaces:
    java.io.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 Detail

      • AbortWithHttpErrorCodeException

        public AbortWithHttpErrorCodeException​(int errorCode,
                                               java.lang.String message)
        Constructor
        Parameters:
        errorCode - the servlet error code; use one of the HttpServletResponse constants
        message - 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 the HttpServletResponse constants
        See Also:
        HttpServletResponse
    • Method Detail

      • getErrorCode

        public int getErrorCode()
        Gets the error code.
        Returns:
        errorCode
        See Also:
        HttpServletResponse
      • getMessage

        public java.lang.String getMessage()
        Gets the error message
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        error message