Package org.apache.sling.api

# Class SlingServletException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.sling.api.SlingException
org.apache.sling.api.SlingServletException

All Implemented Interfaces:
  `Serializable`

public class SlingServletException extends SlingException
The `SlingServletException` is a runtime exception wrapper for the Servlet API `ServletException`. This exception is used to catch a `ServletException` and forward it as a runtime exception to be handled at the outermost level.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`SlingServletException(jakarta.servlet.ServletException cause)`
Create a new exception
`SlingServletException(javax.servlet.ServletException cause)`
Deprecated.
Use `SlingServletException(ServletException)`

## 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 Details

### SlingServletException

public SlingServletException(jakarta.servlet.ServletException cause)
Create a new exception

Parameters:
  `cause` - The cause
Since:
  2.4.0

### SlingServletException

@Deprecated public SlingServletException(javax.servlet.ServletException cause)
Deprecated.
Use `SlingServletException(ServletException)`
Create a new exception

Parameters:
  `cause` - The cause