import org.apache.catalina.connector.Request;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.coyote.ActionCode;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
try {
disp.forward(request.getRequest(), response);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
String msg = sm.getString("formAuthenticator.forwardLoginFail");
log.warn(msg, t);
request.setAttribute(Globals.EXCEPTION_ATTR, t);
try {
disp.forward(request.getRequest(), response);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
String msg = sm.getString("formAuthenticator.forwardErrorFail");
log.warn(msg, t);
request.setAttribute(Globals.EXCEPTION_ATTR, t);
import org.apache.catalina.util.URLEncoder;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Adapter;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.B2CConverter;
}
return (!error);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (!(t instanceof IOException)) {
log.error(sm.getString("coyoteAdapter.service"), t);
}
success = false;
// Ignore
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
success = false;
log.error(sm.getString("coyoteAdapter.service"), t);
} finally {
} catch (IOException e) {
// Ignore
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("coyoteAdapter.service"), t);
} finally {
req.getRequestProcessor().setWorkerThreadName(null);
import org.apache.catalina.util.ParameterMap;
import org.apache.catalina.util.StringParser;
import org.apache.coyote.ActionCode;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.tomcat.util.buf.B2CConverter;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.MessageBytes;
try {
listener.attributeRemoved(event);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
// Error valve will pick this exception up and display it to user
- attributes.put( Globals.EXCEPTION_ATTR, t );
+ attributes.put(Globals.EXCEPTION_ATTR, t);
}
}
}
listener.attributeAdded(event);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
// Error valve will pick this exception up and display it to user
attributes.put( Globals.EXCEPTION_ATTR, t );
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.ResourceSet;
import org.apache.catalina.util.ServerInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.naming.resources.DirContextURLStreamHandler;
import org.apache.naming.resources.Resource;
import org.apache.tomcat.util.buf.CharChunk;
mapuri = mapuri.substring(0, slash);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
return (null);
}
context.fireContainerEvent("afterContextAttributeRemoved",
listener);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
context.fireContainerEvent("afterContextAttributeRemoved",
listener);
// FIXME - should we do anything besides log these?
listener);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (replaced)
context.fireContainerEvent("afterContextAttributeReplaced",
listener);
import org.apache.catalina.Globals;
import org.apache.catalina.security.SecurityUtil;
+import org.apache.jasper.util.ExceptionUtils;
/**
return (Servlet) invokeMethod(context, "getServlet",
new Object[]{name});
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (t instanceof ServletException) {
throw (ServletException) t;
}
return (T) invokeMethod(context, "createFilter",
new Object[]{c});
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (t instanceof ServletException) {
throw (ServletException) t;
}
return (T) invokeMethod(context, "createServlet",
new Object[]{c});
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (t instanceof ServletException) {
throw (ServletException) t;
}
return (T) invokeMethod(context, "createListener",
new Object[]{c});
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (t instanceof ServletException) {
throw (ServletException) t;
}
Method method = context.getClass().getMethod(methodName, clazz);
return executeMethod(method,context,params);
} catch (Exception ex){
- try{
+ try {
handleException(ex);
- }catch (Throwable t){
+ } catch (Throwable t){
+ ExceptionUtils.handleThrowable(t);
throw new RuntimeException(t.getMessage());
}
return null;
import org.apache.catalina.connector.Response;
import org.apache.catalina.connector.ResponseFacade;
import org.apache.catalina.util.InstanceSupport;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
wrapper.getName()), StandardWrapper.getRootCause(e));
servletException = e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
wrapper.getLogger().error(sm.getString("applicationDispatcher.allocateException",
wrapper.getName()), e);
servletException = new ServletException
if (filterChain != null)
filterChain.release();
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
wrapper.getLogger().error(sm.getString("standardWrapper.releaseFilters",
wrapper.getName()), e);
// FIXME: Exception handling needs to be similar to what is in the StandardWrapperValue
wrapper.getName()), e);
servletException = e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
wrapper.getLogger().error(sm.getString("applicationDispatcher.deallocateException",
wrapper.getName()), e);
servletException = new ServletException
import org.apache.catalina.comet.CometProcessor;
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.InstanceSupport;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.tomcat.util.res.StringManager;
/**
filter, request, response, e);
throw e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
if (filter != null)
support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
filter, request, response, e);
servlet, request, response, e);
throw e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
servlet, request, response, e);
throw new ServletException
*/
throw e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
/*if (filter != null)
support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
filter, event, e);*/
*/
throw e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
/*
support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,
servlet, request, response, e);
try {
initializeSSL();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.info(sm.getString("aprListener.sslInit"));
}
}
try {
terminateAPR();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.info(sm.getString("aprListener.aprDestroy"));
}
}
patch = clazz.getField("TCN_PATCH_VERSION").getInt(null);
apver = major * 1000 + minor * 100 + patch;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.info(sm.getString("aprListener.aprInit",
System.getProperty("java.library.path")));
return;
import org.apache.catalina.mbeans.MBeanUtils;
import org.apache.catalina.util.LifecycleBase;
import org.apache.catalina.util.LifecycleMBeanBase;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.naming.resources.ProxyDirContext;
}
container.backgroundProcess();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error("Exception invoking periodic operation: ", t);
} finally {
Thread.currentThread().setContextClassLoader(cl);
import org.apache.catalina.ContainerServlet;
import org.apache.catalina.Globals;
import org.apache.catalina.security.SecurityUtil;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.tomcat.InstanceManager;
import org.apache.tomcat.util.res.StringManager;
return clazz;
}
} catch (Throwable t) {
- //ignore
+ ExceptionUtils.handleThrowable(t);
}
return classLoader.loadClass(className);
}
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
true,
this.getClass().getClassLoader());
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// Should not occur, obviously
log.warn("Couldn't initialize Jasper", t);
}
import org.apache.catalina.util.LifecycleBase;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.URLEncoder;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.naming.ContextBindings;
Class<?> clazz = Class.forName(charsetMapperClass);
this.charsetMapper = (CharsetMapper) clazz.newInstance();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
this.charsetMapper = new CharsetMapper();
}
}
try {
wrapper = (Wrapper) wrapperClass.newInstance();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error("createWrapper", t);
return (null);
}
(InstanceListener) clazz.newInstance();
wrapper.addInstanceListener(listener);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error("createWrapper", t);
return (null);
}
(LifecycleListener) clazz.newInstance();
wrapper.addLifecycleListener(listener);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error("createWrapper", t);
return (null);
}
(ContainerListener) clazz.newInstance();
wrapper.addContainerListener(listener);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error("createWrapper", t);
return (null);
}
new ApplicationFilterConfig(this, filterDefs.get(name));
filterConfigs.put(name, filterConfig);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
getLogger().error
(sm.getString("standardContext.filterStart", name), t);
ok = false;
try {
results[i] = instanceManager.newInstance(listeners[i]);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
getLogger().error
(sm.getString("standardContext.applicationListener",
listeners[i]), t);
listener.contextInitialized(event);
fireContainerEvent("afterContextInitialized", listener);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
fireContainerEvent("afterContextInitialized", listener);
getLogger().error
(sm.getString("standardContext.listenerStart",
listener.contextDestroyed(event);
fireContainerEvent("afterContextDestroyed", listener);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
fireContainerEvent("afterContextDestroyed", listener);
getLogger().error
(sm.getString("standardContext.listenerStop",
try {
getInstanceManager().destroyInstance(listeners[j]);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
getLogger().error
(sm.getString("standardContext.listenerStop",
listeners[j].getClass().getName()), t);
try {
getInstanceManager().destroyInstance(listeners[j]);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
getLogger().error
(sm.getString("standardContext.listenerStop",
listeners[j].getClass().getName()), t);
}
this.resources = proxyDirContext;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("standardContext.resourcesStart"), t);
ok = false;
}
}
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("standardContext.resourcesStop"), t);
ok = false;
}
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.res.StringManager;
listener.requestInitialized(event);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
container.getLogger().error(sm.getString("standardContext.requestListener.requestInit",
instances[i].getClass().getName()), t);
ServletRequest sreq = request.getRequest();
listener.requestDestroyed(event);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
container.getLogger().error(sm.getString("standardContext.requestListener.requestDestroy",
instances[j].getClass().getName()), t);
ServletRequest sreq = request.getRequest();
import org.apache.catalina.mbeans.MBeanUtils;
import org.apache.catalina.util.LifecycleBase;
import org.apache.catalina.valves.ValveBase;
+import org.apache.jasper.util.ExceptionUtils;
/**
getPipeline().addValve(valve);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString
("standardHost.invalidErrorReportValveClass",
errorReportValveClass), t);
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.ErrorPage;
import org.apache.catalina.valves.ValveBase;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
return (true);
} catch (Throwable t) {
-
+ ExceptionUtils.handleThrowable(t);
// Report our failure to process this custom page
container.getLogger().error("Exception Processing " + errorPage, t);
return (false);
import org.apache.catalina.util.LifecycleBase;
import org.apache.catalina.util.LifecycleMBeanBase;
import org.apache.catalina.util.ServerInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.StringCache;
} else
log.error("StoreConfig mbean not registered" + sname);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(t);
}
} else
log.error("StoreConfig mbean not registered" + sname);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(t);
}
} catch (ServletException e) {
throw e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
throw new ServletException
(sm.getString("standardWrapper.allocate"), e);
}
} catch (ServletException e) {
throw e;
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
throw new ServletException
(sm.getString("standardWrapper.allocate"), e);
}
throw new ServletException
(sm.getString("standardWrapper.notServlet", actualClass), e);
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
unavailable(null);
// Added extra log statement for Bugzilla 36630:
// said so, so do not call unavailable(null).
throw f;
} catch (Throwable f) {
+ ExceptionUtils.handleThrowable(f);
getServletContext().log("StandardWrapper.Throwable", f );
instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
servlet, f);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
instanceSupport.fireInstanceEvent
(InstanceEvent.AFTER_DESTROY_EVENT, instance, t);
instance = null;
}
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
instancePool = null;
nInstances = 0;
unloading = false;
this.getClass().getClassLoader().loadClass(classname);
return (ContainerServlet.class.isAssignableFrom(clazz));
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
return (false);
}
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.log.SystemLogHandler;
import org.apache.tomcat.util.res.StringManager;
throwable = e;
exception(request, response, e);
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.allocateException",
wrapper.getName()), e);
throwable = e;
throwable = e;
exception(request, response, e);
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.acknowledgeException",
wrapper.getName()), e);
throwable = e;
throwable = e;
exception(request, response, e);
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
request.removeAttribute(Globals.JSP_FILE_ATTR);
container.getLogger().error(sm.getString(
"standardWrapper.serviceException", wrapper.getName(),
wrapper.deallocate(servlet);
}
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.deallocateException",
wrapper.getName()), e);
if (throwable == null) {
wrapper.unload();
}
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.unloadException",
wrapper.getName()), e);
if (throwable == null) {
throwable = e;
exception(request, response, e);
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.allocateException",
wrapper.getName()), e);
throwable = e;
throwable = e;
exception(request, response, e);
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
request.removeAttribute(Globals.JSP_FILE_ATTR);
container.getLogger().error(sm.getString(
"standardWrapper.serviceException", wrapper.getName(),
wrapper.deallocate(servlet);
}
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.deallocateException",
wrapper.getName()), e);
if (throwable == null) {
wrapper.unload();
}
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
container.getLogger().error(sm.getString("standardWrapper.unloadException",
wrapper.getName()), e);
if (throwable == null) {