package org.apache.tomcat.jni;
+import org.apache.tomcat.util.ExceptionUtils;
+
/** Library
*
* @author Mladen Turk
loaded = true;
}
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
String name = System.mapLibraryName(NAMES[i]);
String path = System.getProperty("java.library.path");
String sep = System.getProperty("path.separator");
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.IntrospectionUtils;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
sources[0] = src;
initialized = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
LogFactory.getLog("org.apache.commons.digester.Digester").
error("Unable to load property source["+className+"].",t);
}
FileItem fileItem = iterator.next();
try {
fileItem.delete();
- } catch (Throwable e) {
+ } catch (Exception e) {
// ignore it
}
}
if (in != null) {
try {
in.close();
- } catch (Throwable t) {
+ } catch (IOException ioe) {
/* Ignore me */
}
}
if (pClose && out != null) {
try {
out.close();
- } catch (Throwable t) {
+ } catch (IOException ioe) {
/* Ignore me */
}
}
import org.apache.tomcat.jni.SSLSocket;
import org.apache.tomcat.jni.Socket;
import org.apache.tomcat.jni.Status;
+import org.apache.tomcat.util.ExceptionUtils;
/**
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
if (step == 2) {
log.debug(sm.getString("endpoint.err.handshake"), t);
log.warn("Socket processing request was rejected for:"+socket,x);
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
log.warn("Socket processing request was rejected for:"+socket,x);
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
log.warn("Socket processing request was rejected for:"+socket,x);
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
log.warn("Socket processing request was rejected for:"+socket,x);
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
destroySocket(socket);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (running) log.error(sm.getString("endpoint.accept.fail"), t);
}
}
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("endpoint.poll.error"), t);
}
}
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("endpoint.poll.error"), t);
}
}
import org.apache.catalina.Globals;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
log.error(sm.getString("endpoint.accept.fail"), npe);
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("endpoint.accept.fail"), t);
}
// The processor will recycle itself when it finishes
// SSL handshake
serverSocketFactory.handshake(socket.getSocket());
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("endpoint.err.handshake"), t);
}
// Close the socket
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("endpoint.err.unexpected"), t);
// Close the socket
return false;
log.warn("Socket processing request was rejected for:"+socket,x);
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
}
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.MutableInteger;
import org.apache.tomcat.util.net.NioEndpoint.KeyAttachment;
if ( log.isDebugEnabled() ) log.debug("Possibly encountered sun bug 5076772 on windows JDK 1.5",x);
continue;
} catch (Throwable x) {
+ ExceptionUtils.handleThrowable(x);
log.error("",x);
continue;
}
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler;
try {
log.fatal(oomParachuteMsg);
}catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
System.err.println(oomParachuteMsg);
}
lastParachuteCheck = System.currentTimeMillis();
}
getPoller0().register(channel);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
try {
log.error("",t);
- }catch ( Throwable tt){}
+ } catch (Throwable tt) {
+ ExceptionUtils.handleThrowable(t);
+ }
// Tell to close the socket
return false;
}
log.warn("Socket processing request was rejected for:"+socket,rx);
return false;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
// This means we got an OOM or similar creating a thread, or that
// the pool and its queue are full
log.error(sm.getString("endpoint.process.fail"), t);
try {
System.err.println(oomParachuteMsg);
oomt.printStackTrace();
- }catch (Throwable letsHopeWeDontGetHere){}
- }catch (Throwable letsHopeWeDontGetHere){}
+ }catch (Throwable letsHopeWeDontGetHere){
+ ExceptionUtils.handleThrowable(letsHopeWeDontGetHere);
+ }
+ }catch (Throwable letsHopeWeDontGetHere){
+ ExceptionUtils.handleThrowable(letsHopeWeDontGetHere);
+ }
}
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("endpoint.accept.fail"), t);
}
}//while
try {if (ka!=null && ka.getSendfileData()!=null && ka.getSendfileData().fchannel!=null && ka.getSendfileData().fchannel.isOpen()) ka.getSendfileData().fchannel.close();}catch (Exception ignore){}
if (ka!=null) ka.reset();
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
if ( log.isDebugEnabled() ) log.error("",e);
// Ignore
}
if ( wakeupCounter == null || selector == null ) throw x;
continue;
} catch (Throwable x) {
+ ExceptionUtils.handleThrowable(x);
log.error("",x);
continue;
}
try {
System.err.println(oomParachuteMsg);
oomt.printStackTrace();
- }catch (Throwable letsHopeWeDontGetHere){}
+ }catch (Throwable letsHopeWeDontGetHere){
+ ExceptionUtils.handleThrowable(letsHopeWeDontGetHere);
+ }
}
}
}//while
} catch ( CancelledKeyException ckx ) {
cancelledKey(sk, SocketStatus.ERROR,false);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error("",t);
}
return result;
try {
System.err.println(oomParachuteMsg);
oomt.printStackTrace();
- }catch (Throwable letsHopeWeDontGetHere){}
+ }catch (Throwable letsHopeWeDontGetHere){
+ ExceptionUtils.handleThrowable(letsHopeWeDontGetHere);
+ }
}
}catch ( Throwable t ) {
log.error("",t);