Package org.apache.sling.cms.core.models
Class ErrorHandler
- java.lang.Object
-
- org.apache.sling.cms.core.models.ErrorHandler
-
@ProviderType @Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class) public class ErrorHandler extends Object
Sling Model for retrieving an error handler based on the specified Sling Request. Checks if the specified resource is contained within a Sling site and if so, will display the error page found at [site-root]/errors/[error-code] or [site-root]/errors/default
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_ERROR_PAGEThe page to fall back to if there is not an error page for the specific codestatic StringSERVICE_USER_NAMEService User Name for the Error Handlerstatic StringSITE_ERRORS_SUBPATHThe subpath under which to find the error pagesstatic StringSLING_CMS_ERROR_PATHPath under which the error pages for Sling CMS can be found.
-
Constructor Summary
Constructors Constructor Description ErrorHandler(org.apache.sling.api.SlingHttpServletRequest slingRequest, org.apache.sling.api.SlingHttpServletResponse slingResponse, Integer errorCode, org.apache.sling.api.resource.ResourceResolverFactory factory)
-
-
-
Field Detail
-
DEFAULT_ERROR_PAGE
public static final String DEFAULT_ERROR_PAGE
The page to fall back to if there is not an error page for the specific code- See Also:
- Constant Field Values
-
SERVICE_USER_NAME
public static final String SERVICE_USER_NAME
Service User Name for the Error Handler- See Also:
- Constant Field Values
-
SITE_ERRORS_SUBPATH
public static final String SITE_ERRORS_SUBPATH
The subpath under which to find the error pages- See Also:
- Constant Field Values
-
SLING_CMS_ERROR_PATH
public static final String SLING_CMS_ERROR_PATH
Path under which the error pages for Sling CMS can be found.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ErrorHandler
@Inject public ErrorHandler(org.apache.sling.api.SlingHttpServletRequest slingRequest, org.apache.sling.api.SlingHttpServletResponse slingResponse, @Named("javax.servlet.error.status_code") Integer errorCode, org.apache.sling.api.resource.ResourceResolverFactory factory)
-
-