Improved exception logging.

This commit is contained in:
Simone Bordet 2012-06-04 15:56:32 +02:00
parent f0c2fd2474
commit 20c0f23cc7
2 changed files with 86 additions and 22 deletions

View File

@ -493,6 +493,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
} }
} }
@ -524,6 +529,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
} }
} }
@ -667,24 +677,33 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, xx); logger.info("Exception while notifying listener " + listener, xx);
} }
catch (Error xx)
{
logger.info("Exception while notifying listener " + listener, xx);
throw xx;
}
} }
private StreamFrameListener notifyOnSyn(SessionFrameListener listener, Stream stream, SynInfo synInfo) private StreamFrameListener notifyOnSyn(SessionFrameListener listener, Stream stream, SynInfo synInfo)
{ {
try try
{ {
if (listener != null) if (listener == null)
{ return null;
logger.debug("Invoking callback with {} on listener {}",synInfo,listener); logger.debug("Invoking callback with {} on listener {}",synInfo,listener);
return listener.onSyn(stream,synInfo); return listener.onSyn(stream,synInfo);
} }
}
catch (Exception x) catch (Exception x)
{ {
logger.info("Exception while notifying listener " + listener,x); logger.info("Exception while notifying listener " + listener,x);
}
return null; return null;
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
}
private void notifyOnRst(SessionFrameListener listener, RstInfo rstInfo) private void notifyOnRst(SessionFrameListener listener, RstInfo rstInfo)
{ {
@ -700,6 +719,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
private void notifyOnSettings(SessionFrameListener listener, SettingsInfo settingsInfo) private void notifyOnSettings(SessionFrameListener listener, SettingsInfo settingsInfo)
@ -716,6 +740,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
private void notifyOnPing(SessionFrameListener listener, PingInfo pingInfo) private void notifyOnPing(SessionFrameListener listener, PingInfo pingInfo)
@ -732,6 +761,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
private void notifyOnGoAway(SessionFrameListener listener, GoAwayInfo goAwayInfo) private void notifyOnGoAway(SessionFrameListener listener, GoAwayInfo goAwayInfo)
@ -748,6 +782,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
@Override @Override
@ -1002,6 +1041,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying handler " + handler, x); logger.info("Exception while notifying handler " + handler, x);
} }
catch (Error x)
{
logger.info("Exception while notifying handler " + handler, x);
throw x;
}
} }
private <C> void notifyHandlerFailed(Handler<C> handler, C context, Throwable x) private <C> void notifyHandlerFailed(Handler<C> handler, C context, Throwable x)
@ -1015,6 +1059,11 @@ public class StandardSession implements ISession, Parser.Listener, Handler<Stand
{ {
logger.info("Exception while notifying handler " + handler, xx); logger.info("Exception while notifying handler " + handler, xx);
} }
catch (Error xx)
{
logger.info("Exception while notifying handler " + handler, xx);
throw xx;
}
} }
public int getWindowSize() public int getWindowSize()

View File

@ -255,6 +255,11 @@ public class StandardStream implements IStream
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
private void notifyOnHeaders(HeadersInfo headersInfo) private void notifyOnHeaders(HeadersInfo headersInfo)
@ -272,6 +277,11 @@ public class StandardStream implements IStream
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
private void notifyOnData(DataInfo dataInfo) private void notifyOnData(DataInfo dataInfo)
@ -290,6 +300,11 @@ public class StandardStream implements IStream
{ {
logger.info("Exception while notifying listener " + listener, x); logger.info("Exception while notifying listener " + listener, x);
} }
catch (Error x)
{
logger.info("Exception while notifying listener " + listener, x);
throw x;
}
} }
@Override @Override