org.apache.wicket.protocol.http.servlet
Class AbortWithWebErrorCodeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.wicket.AbortException
                  extended by org.apache.wicket.AbstractRestartResponseException
                      extended by org.apache.wicket.protocol.http.servlet.AbortWithWebErrorCodeException
All Implemented Interfaces:
java.io.Serializable

public final class AbortWithWebErrorCodeException
extends AbstractRestartResponseException

Causes Wicket to abort processing and set the specified HTTP error code, with the provided message if provided.

Author:
Eelco Hillenius
See Also:
AbortException, WebErrorCodeResponseTarget, Serialized Form

Constructor Summary
AbortWithWebErrorCodeException(int errorCode)
          Construct.
AbortWithWebErrorCodeException(int errorCode, java.lang.String message)
          Construct.
 
Method Summary
 int getErrorCode()
          Gets the error code.
 
Methods inherited from class org.apache.wicket.AbortException
fillInStackTrace
 
Methods inherited from class java.lang.Throwable
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
 

Constructor Detail

AbortWithWebErrorCodeException

public AbortWithWebErrorCodeException(int errorCode)
Construct.

Parameters:
errorCode - the servlet error code; use one of the HttpServletResponse constants
See Also:
HttpServletResponse

AbortWithWebErrorCodeException

public AbortWithWebErrorCodeException(int errorCode,
                                      java.lang.String message)
Construct.

Parameters:
errorCode - the servlet error code; use one of the HttpServletResponse constants
message - the optional message to send to the client
See Also:
HttpServletResponse
Method Detail

getErrorCode

public int getErrorCode()
Gets the error code.

Returns:
errorCode
See Also:
HttpServletResponse


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.