int statusCode=getStatusCode(pe);
if(getConfig().getErrorStatusCode())rsp.setStatus(statusCode);
ErrorPage ep=errorPagePool.getErrorPage(pe,ErrorPageImpl.TYPE_EXCEPTION);
ExceptionHandler.printStackTrace(this,pe);
ExceptionHandler.log(getConfig(),pe);
// error page exception
if(ep!=null) {
try {
Struct sct=pe.getErrorBlock(this,ep);
variablesScope().setEL(KeyConstants._error,sct);
variablesScope().setEL(KeyConstants._cferror,sct);
doInclude(ep.getTemplate());
return;
} catch (Throwable t) {
if(Abort.isSilentAbort(t)) return;
pe=Caster.toPageException(t);
}
}
// error page request
ep=errorPagePool.getErrorPage(pe,ErrorPageImpl.TYPE_REQUEST);
if(ep!=null) {
PageSource ps = ep.getTemplate();
if(ps.physcalExists()){
Resource res = ps.getResource();
try {
String content = IOUtil.toString(res, getConfig().getTemplateCharset());
Struct sct=pe.getErrorBlock(this,ep);