org.apache.sling.api.resource
Class ResourceNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.sling.api.SlingException
                  extended by org.apache.sling.api.resource.ResourceNotFoundException
All Implemented Interfaces:
java.io.Serializable

public class ResourceNotFoundException
extends SlingException

An Exception that causes Sling to return a 404 (NOT FOUND) status code. This exception should not be caught but rather let be handed up the call stack up to the Sling error and exception handling.

The advantage of using this exception over the HttpServletResponse.sendError methods is that the request can be aborted immediately all the way up in the call stack and that in addition to the status code and an optional message a Throwable may be supplied providing more information.

See Also:
Serialized Form

Constructor Summary
ResourceNotFoundException(java.lang.String message)
           
ResourceNotFoundException(java.lang.String resource, java.lang.String message)
           
ResourceNotFoundException(java.lang.String resource, java.lang.String message, java.lang.Throwable cause)
           
ResourceNotFoundException(java.lang.String message, java.lang.Throwable cause)
           
 
Method Summary
 java.lang.String getResource()
           
 
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
 

Constructor Detail

ResourceNotFoundException

public ResourceNotFoundException(java.lang.String message)

ResourceNotFoundException

public ResourceNotFoundException(java.lang.String resource,
                                 java.lang.String message)

ResourceNotFoundException

public ResourceNotFoundException(java.lang.String message,
                                 java.lang.Throwable cause)

ResourceNotFoundException

public ResourceNotFoundException(java.lang.String resource,
                                 java.lang.String message,
                                 java.lang.Throwable cause)
Method Detail

getResource

public java.lang.String getResource()


Copyright © 2007-2009. All Rights Reserved.