/** * Logs a throwable as a session event, including the stack trace. * * @param sessionID the session ID * @param message the error message * @param t the exception to log */ public static void logThrowable(SessionID sessionID, String message, Throwable t) { final Session session = Session.lookupSession(sessionID); if (session != null) { logThrowable(session.getLog(), message, t); } else { // QFJ-335 // It's possible the session has been deregistered by the time // we log the message, so this is the fallback logging. log.error(message, t); } }
public void processMessage() { try { if (m_session.hasResponder()) { m_session.next(m_message); } else { try { final String msgType = m_message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { m_session.next(m_message); } } catch (FieldNotFound ex) { } } } catch (Throwable e) { LogUtil.logThrowable(m_session, e.getMessage(), e); } }