org.apache.sling.api
Class SlingException

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
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InvalidServiceFilterSyntaxException, NoAuthenticationHandlerException, QuerySyntaxException, RecursionTooDeepException, ResourceNotFoundException, ScriptEvaluationException, SlingIOException, SlingServletException, TooManyCallsException

public class SlingException
extends java.lang.RuntimeException

The SlingException is the base exception used throughout the Sling API. This exception should only be thrown if there is no more specific exception defined in the Sling API for the cause and if a cause can be supplied. Otherwise the more specific exception must be used.

The SlingException is a RuntimeException because this exception is not intended to be caught by client code. Rather this exception (and extensions thereof) should be passed through up to the actual Sling error and exception handling.

See Also:
Serialized Form

Constructor Summary
protected SlingException()
          Constructs a new Sling exception.
protected SlingException(java.lang.String text)
          Constructs a new Sling exception with the given text.
  SlingException(java.lang.String text, java.lang.Throwable cause)
          Constructs a new Sling exception when the Servlet needs to do the following: throw an exception include the "root cause" exception include a description message
protected SlingException(java.lang.Throwable cause)
          Constructs a new Sling exception when the Servlet needs to throw an exception.
 
Method Summary
 
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

SlingException

protected SlingException()
Constructs a new Sling exception.


SlingException

protected SlingException(java.lang.String text)
Constructs a new Sling exception with the given text. The Sling framework may use the text to write it to a log.

Parameters:
text - the exception text

SlingException

public SlingException(java.lang.String text,
                      java.lang.Throwable cause)
Constructs a new Sling exception when the Servlet needs to do the following:

Parameters:
text - the exception text
cause - the root cause

SlingException

protected SlingException(java.lang.Throwable cause)
Constructs a new Sling exception when the Servlet needs to throw an exception. The exception's message is based on the localized message of the underlying exception.

Parameters:
cause - the root cause


Copyright © 2007-2009. All Rights Reserved.