Class SlingException

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      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

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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:
        • throw an exception
        • include the "root cause" exception
        • include a description message
        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