Class SlingException

    • Constructor Detail

      • SlingException

        protected SlingException()
        Constructs a new Sling exception.
      • SlingException

        protected SlingException​(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​(String text,
                              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​(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