return ex;
}
return new SlingException(ex) {};
}
int javaLineNumber = jspFrame.getLineNumber();
JavacErrorDetail detail = ErrorDispatcher.createJavacError(
jspFrame.getMethodName(),
this.ctxt.getCompiler().getPageNodes(),
null,
javaLineNumber,
ctxt);
// If the line number is less than one we couldn't find out
// where in the JSP things went wrong
int jspLineNumber = detail.getJspBeginLineNumber();
if (jspLineNumber < 1) {
if ( realException instanceof ServletException ) {
return (ServletException)realException;
}
return new SlingException(exMessage, realException);
}
if (options.getDisplaySourceFragment() && detail.getJspExtract() != null ) {
return new SlingException(Localizer.getMessage
("jsp.exception", detail.getJspFileName(),
"" + jspLineNumber) +
"\n\n" + detail.getJspExtract() +
"\n", realException);
}
return new SlingException(Localizer.getMessage
("jsp.exception", detail.getJspFileName(),
"" + jspLineNumber), realException);
} catch (final Exception je) {
// If anything goes wrong, just revert to the original behaviour
if (realException instanceof ServletException) {
return (ServletException)realException;