I want to handle uncaught exceptions only some times.

According to this page:
http://sling.apache.org/site/errorhandling.html

I created /apps/sling/servlet/errorhandler/Throwable.jsp

But, only when some conditions are met, I want to use custom Throwable.jsp.
Other times, I want sling to use

org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet.

Since I am overriding Throwable.jsp,  how can I call
DefaultErrorHandlerServlet inside Throwable.jsp?

in Throwable.jsp:

if (shouldUseCustomTemplate()) {
    //do my thing
} else {
    new DefaultErrorHandlerServlet.doGet(request, response);
}

Reply via email to